當前位置: 首頁>>代碼示例>>Java>>正文


Java ActionModeHelper類代碼示例

本文整理匯總了Java中eu.davidea.flexibleadapter.helpers.ActionModeHelper的典型用法代碼示例。如果您正苦於以下問題:Java ActionModeHelper類的具體用法?Java ActionModeHelper怎麽用?Java ActionModeHelper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActionModeHelper類屬於eu.davidea.flexibleadapter.helpers包,在下文中一共展示了ActionModeHelper類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initializeActionModeHelper

import eu.davidea.flexibleadapter.helpers.ActionModeHelper; //導入依賴的package包/類
private void initializeActionModeHelper() {
    //this = ActionMode.Callback instance
    mActionModeHelper = new ActionModeHelper(mAdapter, R.menu.menu_action_header, this) {
        // Override to customize the title
        @Override
        public void updateContextTitle(int count) {
            // You can use the internal mActionMode instance
            if (mActionMode != null) {
                int position = mAdapter.getSelectedPositions().get(0);
                AbstractFlexibleItem item = mAdapter.getItem(position);
                mActionMode.setTitle(fontifyString(getActivity(), getString(R.string.action_edit_category, item)));
            }
        }
    }.withDefaultMode(SelectableAdapter.Mode.SINGLE);
    mActionModeHelper.withDefaultMode(SelectableAdapter.Mode.SINGLE);
    mAdapter.setMode(SelectableAdapter.Mode.SINGLE);
}
 
開發者ID:djuelg,項目名稱:Neuronizer,代碼行數:18,代碼來源:TodoListFragment.java

示例2: initializeActionModeHelper

import eu.davidea.flexibleadapter.helpers.ActionModeHelper; //導入依賴的package包/類
private void initializeActionModeHelper(int mode) {
	mActionModeHelper = new ActionModeHelper(mAdapter, mFragment.getContextMenuResId(), this) {
		@Override
		public void updateContextTitle(int count) {
			if (mActionMode != null) {//You can use the internal ActionMode instance
				mActionMode.setTitle(count == 1 ?
						getString(R.string.action_selected_one, Integer.toString(count)) :
						getString(R.string.action_selected_many, Integer.toString(count)));
			}
		}
	}.withDefaultMode(mode);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:MainActivity.java

示例3: initializeActionModeHelper

import eu.davidea.flexibleadapter.helpers.ActionModeHelper; //導入依賴的package包/類
private void initializeActionModeHelper(@Mode int mode) {
    mActionModeHelper = new ActionModeHelper(mAdapter, mFragment.getContextMenuResId(), this) {
        @Override
        public void updateContextTitle(int count) {
            if (mActionMode != null) {//You can use the internal ActionMode instance
                mActionMode.setTitle(count == 1 ?
                        getString(R.string.action_selected_one, Integer.toString(count)) :
                        getString(R.string.action_selected_many, Integer.toString(count)));
            }
        }
    }.withDefaultMode(mode)
     .disableDragOnActionMode(true)
     .disableSwipeOnActionMode(true);
}
 
開發者ID:davideas,項目名稱:FlexibleAdapter,代碼行數:15,代碼來源:MainActivity.java


注:本文中的eu.davidea.flexibleadapter.helpers.ActionModeHelper類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。