当前位置: 首页>>代码示例>>Java>>正文


Java ActionMode.getMenuInflater方法代码示例

本文整理汇总了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;
}
 
开发者ID:danlls,项目名称:Todule-android,代码行数:17,代码来源:ToduleListFragment.java

示例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;
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:11,代码来源:MessageListFragment.java

示例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;
}
 
开发者ID:coffeeplanter,项目名称:SimpleNotes,代码行数:9,代码来源:MultiChoiceImplementation.java

示例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;
}
 
开发者ID:gsantner,项目名称:markor,代码行数:8,代码来源:FilesystemListFragment.java

示例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;
}
 
开发者ID:NewCasino,项目名称:browser,代码行数:8,代码来源:CustomWebView.java

示例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;
}
 
开发者ID:smashingboxes,项目名称:android-analytics,代码行数:8,代码来源:MainFragment.java

示例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;
}
 
开发者ID:danlls,项目名称:Todule-android,代码行数:10,代码来源:ToduleLabelFragment.java

示例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;
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:11,代码来源:WallpaperPickerActivity.java

示例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;
}
 
开发者ID:mosamabinomar,项目名称:RootPGPExplorer,代码行数:8,代码来源:ActionViewHandler.java

示例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;
}
 
开发者ID:jonashao,项目名称:Samantha,代码行数:7,代码来源:EditTemplatePatternFragment.java

示例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;
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:16,代码来源:MarkdownInputEditor.java


注:本文中的android.view.ActionMode.getMenuInflater方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。