當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。