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 =
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeInt(menuItemId);
+ dest.writeInt(mMenuItemId);
}
}
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>() {
@Override
public void writeToParcel(Parcel outParcel, int flags) {
- outParcel.writeTypedList(menuItems);
+ outParcel.writeTypedList(mMenuItems);
}
}
+/**
+ * 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;
* 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
@Override
public MenuItem setTitle(CharSequence title) {
- this.title = title;
+ this.mTitle = title;
return this;
}
@Override
public CharSequence getTitle() {
- return this.title;
+ return this.mTitle;
}
@Override