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


Java ActionMode.Callback方法代碼示例

本文整理匯總了Java中com.actionbarsherlock.view.ActionMode.Callback方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionMode.Callback方法的具體用法?Java ActionMode.Callback怎麽用?Java ActionMode.Callback使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.actionbarsherlock.view.ActionMode的用法示例。


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

示例1: startActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionMode startActionMode(ActionMode.Callback callback) {
    boolean wasHidden = false;
    if (mActionMode != null) {
        wasHidden = mWasHiddenBeforeMode;
        mActionMode.finish();
    }

    mContextView.killMode();
    ActionModeImpl mode = new ActionModeImpl(callback);
    if (mode.dispatchOnCreate()) {
        mWasHiddenBeforeMode = !isShowing() || wasHidden;
        mode.invalidate();
        mContextView.initForMode(mode);
        animateToMode(true);
        if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
            // TODO animate this
            mSplitView.setVisibility(View.VISIBLE);
        }
        mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
        mActionMode = mode;
        return mode;
    }
    return null;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:25,代碼來源:ActionBarImpl.java

示例2: startActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
@Override
public ActionMode startActionMode(ActionMode.Callback callback) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[startActionMode] callback: " + callback);

    if (mActionMode != null) {
        mActionMode.finish();
    }
    ActionModeCallbackWrapper wrapped = null;
    if (callback != null) {
        wrapped = new ActionModeCallbackWrapper(callback);
    }

    //Calling this will trigger the callback wrapper's onCreate which
    //is where we will set the new instance to mActionMode since we need
    //to pass it through to the sherlock callbacks and the call below
    //will not have returned yet to store its value.
    if (mActivity.startActionMode(wrapped) == null) {
        mActionMode = null;
    }
    if (mActivity instanceof OnActionModeStartedListener && mActionMode != null) {
        ((OnActionModeStartedListener)mActivity).onActionModeStarted(mActionMode);
    }

    return mActionMode;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:26,代碼來源:ActionBarSherlockNative.java

示例3: StandaloneActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public StandaloneActionMode(Context context, ActionBarContextView view,
        ActionMode.Callback callback, boolean isFocusable) {
    mContext = context;
    mContextView = view;
    mCallback = callback;

    mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    mMenu.setCallback(this);
    mFocusable = isFocusable;
}
 
開發者ID:zhangxiaomenglin,項目名稱:PalmCampus,代碼行數:11,代碼來源:StandaloneActionMode.java

示例4: StandaloneActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public StandaloneActionMode(Context context, ActionBarContextView view,
                            ActionMode.Callback callback, boolean isFocusable) {
    mContext = context;
    mContextView = view;
    mCallback = callback;

    mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    mMenu.setCallback(this);
    mFocusable = isFocusable;
}
 
開發者ID:ivanovpv,項目名稱:darksms,代碼行數:11,代碼來源:StandaloneActionMode.java

示例5: startActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionMode startActionMode(ActionMode.Callback callback) {
    return getSherlock().startActionMode(callback);
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:4,代碼來源:SherlockPreferenceActivity.java

示例6: ActionModeCallbackWrapper

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionModeCallbackWrapper(ActionMode.Callback wrapped) {
    mWrapped = wrapped;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:4,代碼來源:ActionBarSherlockCompat.java

示例7: ActionModeCallbackWrapper

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionModeCallbackWrapper(ActionMode.Callback callback) {
    mCallback = callback;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:4,代碼來源:ActionBarSherlockNative.java

示例8: ActionModeImpl

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionModeImpl(ActionMode.Callback callback) {
    mCallback = callback;
    mMenu = new MenuBuilder(getThemedContext())
            .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    mMenu.setCallback(this);
}
 
開發者ID:zhangxiaomenglin,項目名稱:PalmCampus,代碼行數:7,代碼來源:ActionBarImpl.java

示例9: startActionMode

import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
/**
 * Start an action mode.
 *
 * @param callback Callback that will manage lifecycle events for this
 *                 context mode.
 * @return The ContextMode that was started, or null if it was canceled.
 * @see ActionMode
 */
public abstract ActionMode startActionMode(ActionMode.Callback callback);
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:10,代碼來源:ActionBarSherlock.java


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