本文整理匯總了Java中com.actionbarsherlock.internal.widget.ActionBarContextView類的典型用法代碼示例。如果您正苦於以下問題:Java ActionBarContextView類的具體用法?Java ActionBarContextView怎麽用?Java ActionBarContextView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ActionBarContextView類屬於com.actionbarsherlock.internal.widget包,在下文中一共展示了ActionBarContextView類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import com.actionbarsherlock.internal.widget.ActionBarContextView; //導入依賴的package包/類
private void init(View decor) {
mContext = decor.getContext();
mActionView = (ActionBarView) decor.findViewById(R.id.abs__action_bar);
mContextView = (ActionBarContextView) decor.findViewById(
R.id.abs__action_context_bar);
mContainerView = (ActionBarContainer) decor.findViewById(
R.id.abs__action_bar_container);
mSplitView = (ActionBarContainer) decor.findViewById(
R.id.abs__split_action_bar);
if (mActionView == null || mContextView == null || mContainerView == null) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
"with a compatible window decor layout");
}
mActionView.setContextView(mContextView);
mContextDisplayMode = mActionView.isSplitActionBar() ?
CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
// Older apps get the home button interaction enabled by default.
// Newer apps need to enable it explicitly.
setHomeButtonEnabled(mContext.getApplicationInfo().targetSdkVersion < 14);
setHasEmbeddedTabs(getResources_getBoolean(mContext,
R.bool.abs__action_bar_embed_tabs));
}
示例2: StandaloneActionMode
import com.actionbarsherlock.internal.widget.ActionBarContextView; //導入依賴的package包/類
public StandaloneActionMode(Context context, ActionBarContextView view,
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;
}
示例3: init
import com.actionbarsherlock.internal.widget.ActionBarContextView; //導入依賴的package包/類
private void init(View decor) {
mContext = decor.getContext();
mActionView = (ActionBarView) decor.findViewById(R.id.abs__action_bar);
mContextView = (ActionBarContextView) decor.findViewById(
R.id.abs__action_context_bar);
mContainerView = (ActionBarContainer) decor.findViewById(
R.id.abs__action_bar_container);
mSplitView = (ActionBarContainer) decor.findViewById(
R.id.abs__split_action_bar);
if (mActionView == null || mContextView == null || mContainerView == null) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
"with a compatible window decor layout");
}
mActionView.setContextView(mContextView);
mContextDisplayMode = mActionView.isSplitActionBar() ?
CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
// Older apps get the home button interaction enabled by default.
// Newer apps need to enable it explicitly.
boolean homeButtonEnabled = mContext.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH;
// If the homeAsUp display option is set, always enable the home button.
homeButtonEnabled |= (mActionView.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0;
setHomeButtonEnabled(homeButtonEnabled);
setHasEmbeddedTabs(getResources_getBoolean(mContext,
R.bool.abs__action_bar_embed_tabs));
}
示例4: StandaloneActionMode
import com.actionbarsherlock.internal.widget.ActionBarContextView; //導入依賴的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;
}