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