((OnActionModeStartedListener)mActivity).onActionModeStarted(mActionMode);
((OnActionModeStartedListener)mActivity).onActionModeStarted(mActionMode);
@Override public ActionMode startActionMode(com.actionbarsherlock.view.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; }