本文整理匯總了Java中android.view.ActionMode.getMenuInflater方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionMode.getMenuInflater方法的具體用法?Java ActionMode.getMenuInflater怎麽用?Java ActionMode.getMenuInflater使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.view.ActionMode
的用法示例。
在下文中一共展示了ActionMode.getMenuInflater方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(getMenuRes(loaderId), menu);
// Show checkboxes
if(mAdapter instanceof HistoryAdapter){
((HistoryAdapter) mAdapter).setShowCheckbox(true);
} else if (mAdapter instanceof MainCursorAdapter){
((MainCursorAdapter) mAdapter).setShowCheckbox(true);
}
actionMode.setTitle(selectedIds.size() + " selected");
mActionMode = actionMode;
return true;
}
示例2: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.message_list_context, menu);
// check capabilities
setContextCapabilities(account, menu);
return true;
}
示例3: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
//Здесь надуваем наше меню из xml
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
Log.d(TAG, "onCreateActionMode");
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.action_mode_menu, menu);
return true;
}
示例4: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.filesystem__context_menu, menu);
mode.setTitle(getResources().getString(R.string.select_elements));
return true;
}
示例5: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mActionMode = mode;
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.menu_main, menu);
return true;
}
示例6: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
// Inflate a menu resource providing context menu items
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.context_menu, menu);
return true;
}
示例7: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.menu_action_mode_label, menu);
lAdapter.setShowCheckbox(true);
actionMode.setTitle(selectedIds.size() + " selected");
return true;
}
示例8: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
/**
* Called when the action mode is created; startActionMode() was called
*/
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
// Inflate a menu resource providing context menu items
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.cab_delete_wallpaper, menu);
return true;
}
示例9: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
Log.d("actionMode", "onCreateActionMode: created action mode");
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.file_select_options,menu);
return true;
}
示例10: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater menuInflater = mode.getMenuInflater();
menuInflater.inflate(R.menu.menu_edit_template_text_selection_insert, menu);
return true;
}
示例11: onCreateActionMode
import android.view.ActionMode; //導入方法依賴的package包/類
/**
* Called when action mode is first created. The menu supplied will be used to
* generate action buttons for the action mode.
*
* @param mode ActionMode being created
* @param menu Menu used to populate action buttons
* @return true if the action mode should be created, false if entering this
* mode should be aborted.
*/
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.editor_menu, menu);
return true;
}