本文整理汇总了Java中android.support.v7.view.ActionMode.getMenuInflater方法的典型用法代码示例。如果您正苦于以下问题:Java ActionMode.getMenuInflater方法的具体用法?Java ActionMode.getMenuInflater怎么用?Java ActionMode.getMenuInflater使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.view.ActionMode
的用法示例。
在下文中一共展示了ActionMode.getMenuInflater方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.conversation_context, menu);
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;
}
示例2: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
if (BuildConfig.LOG_DEBUG) LogUtils.d(TAG, actionMode, menu);
/* Inflate a menu resource providing context menu items. */
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.query_cab, menu);
return true;
}
示例3: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
if (BuildConfig.LOG_DEBUG) LogUtils.d(TAG, actionMode, menu);
/* Inflate a menu resource providing context menu items. */
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.book_cab, menu);
return true;
}
示例4: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.menu_context_messages, menu);
((ChatFragment) getParentFragment()).setTabsHidden(true);
mActionMode = mode;
return true;
}
示例5: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
if (nextSelection.isWithPIN()) {
inflater.inflate(R.menu.actionmode_menu, menu);
} else {
inflater.inflate(R.menu.actionmode_menu_nopin, menu);
}
return true;
}
示例6: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
// Inflate a menu resource providing context menu items
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.settings_cab_actions, menu);
isMultiSelectionActive = true;
return true;
}
示例7: onCreateActionMode
import android.support.v7.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.comment_context_menu, menu);
menu.findItem(R.id.editMenuItem).setVisible(hasAccessToEditComment(selectedComment.getAuthorId()));
return true;
}
示例8: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.messages_menu, menu);
return true;
}
示例9: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(final ActionMode mode, final Menu menu) {
final MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.action_mode_menu, menu);
return true;
}
示例10: onCreateActionMode
import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.menu_multi_choice, menu);
return true;
}