本文整理汇总了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;
}