Java Code Examples for androidx.appcompat.view.ActionMode#getMenuInflater()
The following examples show how to use
androidx.appcompat.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: ConversationFragment.java From mollyim-android with GNU General Public License v3.0 | 7 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.conversation_context, menu); mode.setTitle("1"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getActivity().getWindow(); statusBarColor = window.getStatusBarColor(); window.setStatusBarColor(getResources().getColor(R.color.action_mode_status_bar)); } setCorrectMenuVisibility(menu); AdaptiveActionsToolbar.adjustMenuActions(menu, 10, requireActivity().getWindow().getDecorView().getMeasuredWidth()); listener.onMessageActionToolbarOpened(); return true; }
Example 2
Source File: ConversationFragment.java From deltachat-android with GNU General Public License v3.0 | 6 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.conversation_context, menu); mode.setTitle("1"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getActivity().getWindow(); statusBarColor = window.getStatusBarColor(); window.setStatusBarColor(getResources().getColor(R.color.action_mode_status_bar)); } setCorrectMenuVisibility(menu); return true; }
Example 3
Source File: CGroupActivity.java From call_manage with MIT License | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items mActionMode = mode; MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.contextual_list_editing, menu); return true; }
Example 4
Source File: ChatMessagesFragment.java From revolution-irc 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.menu_context_messages_full, menu); ((ChatFragment) getParentFragment()).setTabsHidden(true); mActionMode = mode; return true; }
Example 5
Source File: MainActivity.java From MaterialTapTargetPrompt with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.actionmode, menu); return true; }
Example 6
Source File: MessageActivity.java From toktok-android with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(@NonNull ActionMode mode, Menu menu) { MenuInflater menuInflater = mode.getMenuInflater(); menuInflater.inflate(R.menu.message_action_mode, menu); mRecyclerAdapter.setActionModeActive(true); mRecyclerAdapter.notifyDataSetChanged(); Animation animationOut = AnimationUtils.loadAnimation(mInputLayout.getContext(), R.anim.abc_slide_out_bottom); mInputLayout.startAnimation(animationOut); mInputLayout.setVisibility(View.GONE); return true; }
Example 7
Source File: CourseOutlineFragment.java From edx-app-android with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { // Inflate a menu resource providing context menu items final MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.delete_contextual_menu, menu); menu.findItem(R.id.item_delete).setIcon( new IconDrawable(getContext(), FontAwesomeIcons.fa_trash_o) .colorRes(getContext(), R.color.white) .actionBarSize(getContext()) ); mode.setTitle(R.string.delete_videos_title); return true; }
Example 8
Source File: MainListFragment.java From Passbook with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.menu_remove, menu); showFab(false); mActionModeDestroyed = false; mFromMenu = false; mListener.onLockDrawer(true); return true; }
Example 9
Source File: MainListFragment.java From Passbook with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode actionMode, Menu menu) { showFab(false); MenuInflater inflater = actionMode.getMenuInflater(); inflater.inflate(R.menu.menu_edit, menu); mListener.onLockDrawer(true); return true; }
Example 10
Source File: MainActivity.java From Aegis with GNU General Public License v3.0 | 4 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.menu_action_mode, menu); return true; }