当前位置: 首页>>代码示例>>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;未经允许,请勿转载。