Java Code Examples for android.support.v7.view.ActionMode#setTitle()
The following examples show how to use
android.support.v7.view.ActionMode#setTitle() .
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: ConversationListFragment.java From Silence with GNU General Public License v3.0 | 6 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = getActivity().getMenuInflater(); if (archive) inflater.inflate(R.menu.conversation_list_batch_unarchive, menu); else inflater.inflate(R.menu.conversation_list_batch_archive, menu); inflater.inflate(R.menu.conversation_list_batch, menu); inflater.inflate(R.menu.conversation_send_drafts, menu); mode.setTitle(R.string.conversation_fragment_cab__batch_selection_mode); mode.setSubtitle(null); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getActivity().getWindow(); window.setStatusBarColor(getResources().getColor(R.color.action_mode_status_bar)); window.setNavigationBarColor(getResources().getColor(android.R.color.black)); } return true; }
Example 2
Source File: ExamScheduleFragment.java From utexas-utilities with Apache License 2.0 | 6 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { mode.setTitle("Exam Info"); MenuInflater inflater = getActivity().getMenuInflater(); String[] elements = selectedExam.split("\\^"); if (elements.length >= 3) { // TODO: check this? if (elements[2].contains("The department") || elements[2] .contains("Information on final exams is available for Nine-Week Summer Session(s) only.") || elements.length <= 4) { return true; } } else { return true; } inflater.inflate(R.menu.schedule_action_mode, menu); return true; }
Example 3
Source File: ActionModeTitle.java From PlayMusicExporter with MIT License | 5 votes |
@Override public boolean onPrepareActionMode(ActionMode mode, Menu menu) { updateViews(); // Update the title mode.setTitle(mContext.getString(R.string.action_mode_track_selection, mSelectionList.getSelectedItems().size())); return false; // Return false if nothing is done }
Example 4
Source File: CourseScheduleFragment.java From utexas-utilities with Apache License 2.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { mode.setTitle("Class Info"); mode.setSubtitle(currentClasstime.getCourseId()); MenuInflater inflater = parentAct.getMenuInflater(); inflater.inflate(R.menu.schedule_action_mode, menu); return true; }
Example 5
Source File: ChatTargetActionModeCallback.java From Plumble with GNU General Public License v3.0 | 5 votes |
@Override public boolean onCreateActionMode(ActionMode actionMode, Menu menu) { actionMode.setTitle(mChatTarget.getName()); actionMode.setSubtitle(R.string.current_chat_target); mProvider.setChatTarget(getChatTarget()); return true; }
Example 6
Source File: HandleAdapterActivity.java From FancyAdapters with MIT License | 4 votes |
@Override public void onSelectionUpdate(ActionMode mode, int selectedCount) { mode.setTitle(selectedCount + " item(s)"); }
Example 7
Source File: SuperSelectableAdapterActivity.java From FancyAdapters with MIT License | 4 votes |
@Override public void onSelectionUpdate(ActionMode mode, int selectedCount) { mode.setTitle(selectedCount + " item(s)"); }
Example 8
Source File: SelectableViewAdapterActivity.java From FancyAdapters with MIT License | 4 votes |
@Override public void onSelectionUpdate(ActionMode mode, int selectedCount) { mode.setTitle(selectedCount + " item(s)"); }
Example 9
Source File: SelectableAdapterActivity.java From FancyAdapters with MIT License | 4 votes |
@Override public void onSelectionUpdate(ActionMode mode, int selectedCount) { mode.setTitle(selectedCount + " item(s)"); }
Example 10
Source File: LrcJaeger.java From LrcJaeger with Apache License 2.0 | 4 votes |
@Override public void onItemCheckedStateChanged(ActionMode mode, int position, boolean checked) { int count = mMultiChoiceFacade.getCheckedItemCount(); String str = String.format(getString(R.string.title_items_checked), count); mode.setTitle(str); }