com.actionbarsherlock.internal.widget.ActionBarContextView Java Examples
The following examples show how to use
com.actionbarsherlock.internal.widget.ActionBarContextView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActionBarImpl.java From android-apps with MIT License | 6 votes |
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)); }
Example #2
Source File: StandaloneActionMode.java From CSipSimple with GNU General Public License v3.0 | 5 votes |
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; }
Example #3
Source File: ActionBarImpl.java From CSipSimple with GNU General Public License v3.0 | 5 votes |
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)); }
Example #4
Source File: StandaloneActionMode.java From android-apps with MIT License | 5 votes |
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; }
Example #5
Source File: StandaloneActionMode.java From zen4android with MIT License | 5 votes |
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; }
Example #6
Source File: ActionBarImpl.java From zen4android with MIT License | 5 votes |
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)); }
Example #7
Source File: StandaloneActionMode.java From zhangshangwuda with Apache License 2.0 | 5 votes |
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; }
Example #8
Source File: ActionBarImpl.java From zhangshangwuda with Apache License 2.0 | 5 votes |
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)); }
Example #9
Source File: StandaloneActionMode.java From Libraries-for-Android-Developers with MIT License | 5 votes |
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; }
Example #10
Source File: ActionBarImpl.java From Libraries-for-Android-Developers with MIT License | 5 votes |
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)); }