當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。