Java Code Examples for android.view.ActionMode#getMenuInflater()
The following examples show how to use
android.view.ActionMode#getMenuInflater() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FragmentSongs.java From Bop with Apache License 2.0 | 6 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.selected, menu); Drawable drawable1 = menu.getItem(0).getIcon(); Drawable drawable2 = menu.getItem(1).getIcon(); drawable1.mutate(); drawable2.mutate(); if (!Main.settings.get("modes", "Day").equals("Day")) { drawable1.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_IN); drawable2.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_IN); } else { drawable1.setColorFilter(getResources().getColor(R.color.md_grey_900), PorterDuff.Mode.SRC_IN); drawable2.setColorFilter(getResources().getColor(R.color.md_grey_900), PorterDuff.Mode.SRC_IN); } return true; }
Example 2
Source File: OutlineActionMode.java From mOrgAnd with GNU General Public License v2.0 | 6 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); // if (this.node != null && this.node.Id >= 0 && node.isEditable()) { // inflater.inflate(R.menu.outline_node, menu); // } // else if(this.node != null && this.node.type == OrgNode.Type.File) { // if(this.node.title.equals(OrgFile.AGENDA_FILE_ALIAS)) // inflater.inflate(R.menu.outline_file_uneditable, menu); // else // inflater.inflate(R.menu.outline_file, menu); // } else // inflater.inflate(R.menu.outline_node_uneditable, menu); // return true; }
Example 3
Source File: SelectionDemo.java From StickyHeaders with MIT License | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { appBarLayout.setExpanded(false, true); MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.menu_cab_selectiondemo, menu); return true; }
Example 4
Source File: ServerListActivity.java From padland with Apache License 2.0 | 5 votes |
/** * Called when the action mode is created; startActionMode() was called * * @param mode * @param menu * @return boolean */ @Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.server_list, menu); mActionMode = mode; return true; }
Example 5
Source File: ImageSelectActivity.java From MultipleImageSelect with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater menuInflater = mode.getMenuInflater(); menuInflater.inflate(R.menu.menu_contextual_action_bar, menu); actionMode = mode; countSelected = 0; return true; }
Example 6
Source File: WidgetTimezones.java From SuntimesWidget with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.timezonesort, menu); return true; }
Example 7
Source File: MultiModeListenerManage.java From rss with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); if(null != inflater) { inflater.inflate(R.menu.context_manage, menu); return true; } return false; }
Example 8
Source File: ConversationView.java From Zom-Android-XMPP with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.menu_message_context, menu); return true; }
Example 9
Source File: CategoriesFragment.java From Expense-Tracker-App with MIT License | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.expenses_context_menu, menu); return true; }
Example 10
Source File: DownloadHistoryPhotoFragment.java From Instagram-Profile-Downloader with MIT License | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.menu_delete, menu); return true; }
Example 11
Source File: ManageDownloadsActivity.java From android-viewer-for-khan-academy with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { Log.d(LOG_TAG, "onCreateActionMode"); MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.downloads_actionmode, menu); actionMode = mode; return true; }
Example 12
Source File: OverviewActivity.java From codeexamples-android with Eclipse Public License 1.0 | 5 votes |
public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items MenuInflater inflater = mode.getMenuInflater(); // Assumes that you have "contexual.xml" menu resources inflater.inflate(R.menu.contextual, menu); return true; }
Example 13
Source File: WishlistListFragment.java From MonsterHunter4UDatabase with MIT License | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.context_wishlist, menu); return true; }
Example 14
Source File: TwoLinesArrayAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }
Example 15
Source File: MyGridAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }
Example 16
Source File: MyArrayAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }
Example 17
Source File: ListFragment.java From holoaccent with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.spinner, menu); return true; }
Example 18
Source File: GalleryAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }
Example 19
Source File: NonCheckableItemsAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }
Example 20
Source File: AlphabetIndexerCursorAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.my_action_mode, menu); return true; }