当前位置: 首页>>代码示例>>Java>>正文


Java ActionBarContextView类代码示例

本文整理汇总了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));
}
 
开发者ID:tamzi,项目名称:sophia,代码行数:27,代码来源:ActionBarImpl.java

示例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;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:11,代码来源:StandaloneActionMode.java

示例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));
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:32,代码来源:ActionBarImpl.java

示例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;
}
 
开发者ID:ivanovpv,项目名称:darksms,代码行数:11,代码来源:StandaloneActionMode.java


注:本文中的com.actionbarsherlock.internal.widget.ActionBarContextView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。