Skip to content

Commit

Permalink
fixed m-Prefixing
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyScherzinger committed Aug 20, 2015
1 parent a544a0c commit ee85bf9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
26 changes: 12 additions & 14 deletions src/com/owncloud/android/ui/dialog/parcel/MenuItemParcelable.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,35 @@
import android.view.MenuItem;

public class MenuItemParcelable implements Parcelable {
int menuItemId;
int mMenuItemId;
String mMenuText;

String menuText;

public MenuItemParcelable() {
}
public MenuItemParcelable() {}

public MenuItemParcelable(MenuItem menuItem) {
menuItemId = menuItem.getItemId();
menuText = menuItem.getTitle().toString();
mMenuItemId = menuItem.getItemId();
mMenuText = menuItem.getTitle().toString();
menuItem.getMenuInfo();
}

public MenuItemParcelable(Parcel read) {
menuItemId = read.readInt();
mMenuItemId = read.readInt();
}

public void setMenuItemId(int id) {
menuItemId = id;
mMenuItemId = id;
}

public int getMenuItemId() {
return menuItemId;
return mMenuItemId;
}

public String getMenuText() {
return menuText;
return mMenuText;
}

public void setMenuText(String menuText) {
this.menuText = menuText;
public void setMenuText(String mMenuText) {
this.mMenuText = mMenuText;
}

public static final Parcelable.Creator<MenuItemParcelable> CREATOR =
Expand All @@ -59,6 +57,6 @@ public int describeContents() {

@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(menuItemId);
dest.writeInt(mMenuItemId);
}
}
12 changes: 6 additions & 6 deletions src/com/owncloud/android/ui/dialog/parcel/MenuParcelable.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

public class MenuParcelable implements Parcelable {

private List<MenuItemParcelable> menuItems = new ArrayList<MenuItemParcelable>();
private List<MenuItemParcelable> mMenuItems = new ArrayList<MenuItemParcelable>();

public List<MenuItemParcelable> getMenuItems() {
return menuItems;
return mMenuItems;
}

public void setMenuItems(List<MenuItemParcelable> menuItems) {
this.menuItems = menuItems;
this.mMenuItems = menuItems;
}

public MenuParcelable() {
menuItems = new ArrayList<MenuItemParcelable>();
mMenuItems = new ArrayList<MenuItemParcelable>();
}

public MenuParcelable(Parcel in) {
in.readTypedList(menuItems, MenuItemParcelable.CREATOR);
in.readTypedList(mMenuItems, MenuItemParcelable.CREATOR);
}

public static final Parcelable.Creator<MenuParcelable> CREATOR = new Parcelable.Creator<MenuParcelable>() {
Expand All @@ -46,6 +46,6 @@ public int describeContents() {

@Override
public void writeToParcel(Parcel outParcel, int flags) {
outParcel.writeTypedList(menuItems);
outParcel.writeTypedList(mMenuItems);
}
}
32 changes: 26 additions & 6 deletions src/com/owncloud/android/utils/DialogMenuItem.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/**
* ownCloud Android client application
*
* @author Andy Scherzinger
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

package com.owncloud.android.utils;

import android.content.Intent;
Expand All @@ -12,16 +32,16 @@
* Created by scherzia on 17.08.2015.
*/
public class DialogMenuItem implements MenuItem {
int itemId;
CharSequence title;
int mItemId;
CharSequence mTitle;

public DialogMenuItem(int itemId) {
this.itemId = itemId;
this.mItemId = itemId;
}

@Override
public int getItemId() {
return itemId;
return mItemId;
}

@Override
Expand All @@ -36,7 +56,7 @@ public int getOrder() {

@Override
public MenuItem setTitle(CharSequence title) {
this.title = title;
this.mTitle = title;
return this;
}

Expand All @@ -47,7 +67,7 @@ public MenuItem setTitle(int title) {

@Override
public CharSequence getTitle() {
return this.title;
return this.mTitle;
}

@Override
Expand Down

0 comments on commit ee85bf9

Please sign in to comment.