本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: startActionMode
import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionMode startActionMode(ActionMode.Callback callback) {
return getSherlock().startActionMode(callback);
}
示例6: ActionModeCallbackWrapper
import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionModeCallbackWrapper(ActionMode.Callback wrapped) {
mWrapped = wrapped;
}
示例7: ActionModeCallbackWrapper
import com.actionbarsherlock.view.ActionMode; //導入方法依賴的package包/類
public ActionModeCallbackWrapper(ActionMode.Callback callback) {
mCallback = callback;
}
示例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);
}
示例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);