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


Java ActionMode.Callback方法代码示例

本文整理汇总了Java中android.support.v7.view.ActionMode.Callback方法的典型用法代码示例。如果您正苦于以下问题:Java ActionMode.Callback方法的具体用法?Java ActionMode.Callback怎么用?Java ActionMode.Callback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v7.view.ActionMode的用法示例。


在下文中一共展示了ActionMode.Callback方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateActionModeForSelection

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public void updateActionModeForSelection(int selectedCount, ActionMode.Callback actionMode) {
    if (BuildConfig.LOG_DEBUG) LogUtils.d(TAG, selectedCount, actionMode);

    if (mActionMode != null) { /* Action menu is already activated. */
        /* Finish action mode if there are no more selected items. */
        if (selectedCount == 0) {
            mActionMode.finish();
        } else {
            mActionMode.invalidate();
        }

    } else { /* No action menu activated - started it. */
        if (selectedCount > 0) {
            /* Start new action mode. */
            mActionMode = startSupportActionMode(actionMode);
        }
    }
}
 
开发者ID:orgzly,项目名称:orgzly-android,代码行数:20,代码来源:MainActivity.java

示例2: startActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Nullable
@Override
public ActionMode startActionMode(@NonNull final ActionMode.Callback callback) {
    final FragmentActivity activity = mFragment.getActivity();
    if (activity instanceof AppCompatActivity) {
        final AppCompatActivity appCompatActivity = (AppCompatActivity) activity;
        return appCompatActivity.startSupportActionMode(callback);
    } else {
        throw new IllegalStateException("Your activity should extend AppCompatActivity.");
    }
}
 
开发者ID:GlobusLTD,项目名称:recyclerview-android,代码行数:12,代码来源:ActionModeCompat.java

示例3: startSupportActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
public ActionMode startSupportActionMode(ActionMode.Callback callback) {
    if (callback == null) {
        throw new IllegalArgumentException("ActionMode callback can not be null.");
    }
    if (this.mActionMode != null) {
        this.mActionMode.finish();
    }
    ActionMode.Callback wrappedCallback = new ActionModeCallbackWrapperV7(callback);
    ActionBar ab = getSupportActionBar();
    if (ab != null) {
        this.mActionMode = ab.startActionMode(wrappedCallback);
        if (!(this.mActionMode == null || this.mAppCompatCallback == null)) {
            this.mAppCompatCallback.onSupportActionModeStarted(this.mActionMode);
        }
    }
    if (this.mActionMode == null) {
        this.mActionMode = startSupportActionModeFromWindow(wrappedCallback);
    }
    return this.mActionMode;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:AppCompatDelegateImplV7.java

示例4: ActionModeHelper

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
public ActionModeHelper(FastAdapter fastAdapter, int cabMenu, ActionMode.Callback callback) {
    this.mFastAdapter = fastAdapter;
    this.mCabMenu = cabMenu;
    this.mCallback = callback;
    this.mInternalCallback = new ActionBarCallBack();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:ActionModeHelper.java

示例5: getNewActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
abstract public ActionMode.Callback getNewActionMode();
 
开发者ID:orgzly,项目名称:orgzly-android,代码行数:3,代码来源:QueryFragment.java

示例6: getNewActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public ActionMode.Callback getNewActionMode() {
    return new MyActionMode();
}
 
开发者ID:orgzly,项目名称:orgzly-android,代码行数:5,代码来源:BookFragment.java

示例7: startMultiChoice

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
protected ActionMode startMultiChoice(ActionMode.Callback callback) {
    return startSupportActionMode(callback);
}
 
开发者ID:mingdroid,项目名称:tumbviewer,代码行数:4,代码来源:DownloadManagerActivity.java

示例8: startActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
@Override
public ActionMode startActionMode(ActionMode.Callback callback) {
    return ((AppCompatActivity)getActivity()).startSupportActionMode(callback);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:FileListPagerFragment.java

示例9: ActionModeCallbackWrapperV7

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
public ActionModeCallbackWrapperV7(ActionMode.Callback wrapped) {
    this.mWrapped = wrapped;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AppCompatDelegateImplV7.java

示例10: ActionModeHelper

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
/**
 * Constructor with internal callback + custom callback.
 *
 * @param adapter the FlexibleAdapter instance
 * @param cabMenu the menu resourceId
 * @param callback the custom {@link android.support.v7.view.ActionMode.Callback}
 * @see #ActionModeHelper(FlexibleAdapter, int)
 * @since 5.0.0-b6
 */
public ActionModeHelper(@NonNull FlexibleAdapter adapter, @MenuRes int cabMenu,
						@NonNull ActionMode.Callback callback) {
	this(adapter, cabMenu);
	this.mCallback = callback;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:ActionModeHelper.java

示例11: getNewActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
public abstract ActionMode.Callback getNewActionMode(); 
开发者ID:orgzly,项目名称:orgzly-android,代码行数:2,代码来源:NoteListFragment.java

示例12: updateActionModeForSelection

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
void updateActionModeForSelection(int selectedCount, ActionMode.Callback actionMode); 
开发者ID:orgzly,项目名称:orgzly-android,代码行数:2,代码来源:ActionModeListener.java

示例13: startActionMode

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
ActionMode startActionMode(ActionMode.Callback callback); 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:2,代码来源:FileExplorerView.java

示例14: startSupportActionModeFromWindow

import android.support.v7.view.ActionMode; //导入方法依赖的package包/类
abstract ActionMode startSupportActionModeFromWindow(ActionMode.Callback callback); 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:2,代码来源:AppCompatDelegateImplBase.java


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