3
我正在使用動作酒吧夏洛克,我想知道是否有辦法讓行動酒吧黑暗主題(Theme.Sherlock)使用同一個動作條從Light + Dark Action Bar主題(Theme.Sherlock.Light.DarkActionBar)。動作酒吧夏洛克黑暗主題與燈光主題+黑暗行動酒吧
目前,這些是我的風格,但黑暗的主題仍然使用黑暗的行動欄。
<style name="AppTheme.Light" parent="Theme.Sherlock.Light.DarkActionBar" />
<style name="AppTheme.Dark" parent="Theme.Sherlock">
<item name="windowContentOverlay">@drawable/abs__ab_solid_shadow_holo</item>
<item name="actionBarStyle">@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse</item>
<item name="actionBarWidgetTheme">@style/Theme.Sherlock</item>
<item name="actionDropDownStyle">@style/Widget.Sherlock.Spinner.DropDown.ActionBar</item>
<item name="actionButtonStyle">@style/Widget.Sherlock.ActionButton</item>
<item name="actionOverflowButtonStyle">@style/Widget.Sherlock.ActionButton.Overflow</item>
<item name="actionModeBackground">@drawable/abs__cab_background_top_holo_dark</item>
<item name="actionModeSplitBackground">@drawable/abs__cab_background_bottom_holo_dark</item>
<item name="actionModeCloseDrawable">@drawable/abs__ic_cab_done_holo_dark</item>
<item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_dark</item>
<item name="actionBarTabStyle">@style/Widget.Sherlock.Light.ActionBar.TabView.Inverse</item>
<item name="actionBarTabBarStyle">@style/Widget.Sherlock.Light.ActionBar.TabBar.Inverse</item>
<item name="actionBarTabTextStyle">@style/Widget.Sherlock.Light.ActionBar.TabText.Inverse</item>
<item name="actionBarDivider">@drawable/abs__list_divider_holo_dark</item>
<item name="actionBarItemBackground">@drawable/abs__item_background_holo_dark</item>
<item name="actionMenuTextColor">?attr/textColorPrimaryInverse</item>
<item name="actionModeStyle">@style/Widget.Sherlock.Light.ActionMode.Inverse</item>
<item name="actionModeCloseButtonStyle">@style/Widget.Sherlock.ActionButton.CloseMode</item>
<item name="actionModePopupWindowStyle">@style/Widget.Sherlock.PopupWindow.ActionMode</item>
<item name="actionModeShareDrawable">@drawable/abs__ic_menu_share_holo_dark</item>
</style>
我複製操作欄福爾摩斯源代碼中的所有樣式的項目。
'getSupportActionBar()setBackgroundDrawable(該全息光操作欄可繪製);' – adneal 2012-07-31 22:56:07