Sherlock+设备默认值



可以将Action Bar Sherlock与DeviceDefault主题(在>4.2上(和常规主题(在<3.0上(一起使用吗?

重点当然是,我怀疑《神探夏洛克》强迫你使用它自己的主题(其中一些是基于Holo的(。

values/themes.xml:中

<style name="Theme.MyApp" extends="Theme.Sherlock">
</style>

values-v14/themes.xml:中

<style name="Theme.MyApp" extends="android:Theme.DeviceDefault">
</style>

然后在清单中使用Theme.MyApp

实际上是夏洛克。Holo主题只是将Holo主题应用于ActionBar。正如你从《神探夏洛克》中看到的那样。11以下API主题:

<style name="Theme.Sherlock" parent="Sherlock.__Theme">
        <!-- Action bar styles (from Theme.Holo) -->
        <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="actionBarTabStyle">@style/Widget.Sherlock.ActionBar.TabView</item>
        <item name="actionBarTabBarStyle">@style/Widget.Sherlock.ActionBar.TabBar</item>
        <item name="actionBarTabTextStyle">@style/Widget.Sherlock.ActionBar.TabText</item>
        <item name="actionModeStyle">@style/Widget.Sherlock.ActionMode</item>
        <item name="actionModeCloseButtonStyle">@style/Widget.Sherlock.ActionButton.CloseMode</item>
        <item name="actionBarStyle">@style/Widget.Sherlock.ActionBar</item>
        <item name="actionBarSize">@dimen/abs__action_bar_default_height</item>
        <!-- Internal --><item name="actionModePopupWindowStyle">@style/Widget.Sherlock.PopupWindow.ActionMode</item>
        <item name="actionBarWidgetTheme">@null</item>
        <!-- Action bar styles (defaults from Theme) -->
        <item name="actionBarSplitStyle">?attr/actionBarStyle</item>
        <item name="actionMenuTextAppearance">@style/TextAppearance.Sherlock.Widget.ActionBar.Menu</item>
        <item name="actionMenuTextColor">?attr/textColorPrimary</item>
        <item name="actionBarDivider">?attr/dividerVertical</item>
        <item name="actionBarItemBackground">?attr/selectableItemBackground</item>
        <item name="buttonStyleSmall">@style/Widget.Sherlock.Button.Small</item>
        <item name="selectableItemBackground">@drawable/abs__item_background_holo_dark</item>
        <item name="activatedBackgroundIndicator">@drawable/abs__activated_background_holo_dark</item>
        <item name="actionModeShareDrawable">@drawable/abs__ic_menu_share_holo_dark</item>
        <item name="activityChooserViewStyle">@style/Widget.Sherlock.ActivityChooserView</item>
        <item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_dark</item>
        <item name="dividerVertical">@drawable/abs__list_divider_holo_dark</item>
        <item name="spinnerDropDownItemStyle">@style/Widget.Sherlock.DropDownItem.Spinner</item>
        <item name="spinnerItemStyle">@style/Widget.Sherlock.TextView.SpinnerItem</item>
        <item name="textColorPrimary">@color/abs__primary_text_holo_dark</item>
        <item name="textColorPrimaryDisableOnly">@color/abs__primary_text_disable_only_holo_dark</item>
        <item name="textColorPrimaryInverse">@color/abs__primary_text_holo_light</item>
        <!-- Internal --><item name="dropdownListPreferredItemHeight">48dip</item>
        <item name="dropDownListViewStyle">@style/Widget.Sherlock.ListView.DropDown</item>
        <item name="textAppearanceSmall">@style/TextAppearance.Sherlock.Small</item>
        <item name="textAppearanceLargePopupMenu">@style/TextAppearance.Sherlock.Widget.PopupMenu.Large</item>
        <item name="textAppearanceSmallPopupMenu">@style/TextAppearance.Sherlock.Widget.PopupMenu.Small</item>
        <item name="popupMenuStyle">@style/Widget.Sherlock.PopupMenu</item>
        <!-- Internal --><item name="listPopupWindowStyle">@style/Widget.Sherlock.ListPopupWindow</item>
        <item name="searchDropdownBackground">@drawable/abs__search_dropdown_dark</item>
        <item name="searchViewTextField">@drawable/abs__textfield_searchview_holo_dark</item>
        <item name="searchViewTextFieldRight">@drawable/abs__textfield_searchview_right_holo_dark</item>
        <item name="searchViewCloseIcon">@drawable/abs__ic_clear</item>
        <item name="searchViewSearchIcon">@drawable/abs__ic_search</item>
        <item name="searchViewGoIcon">@drawable/abs__ic_go</item>
        <item name="searchViewVoiceIcon">@drawable/abs__ic_voice_search</item>
        <item name="searchAutoCompleteTextView">@style/Widget.Sherlock.SearchAutoCompleteTextView</item>
        <item name="android:dropDownHintAppearance">@style/TextAppearance.Sherlock.Widget.DropDownHint</item>
        <item name="windowActionBar">true</item>
        <item name="windowActionModeOverlay">false</item>
        <item name="windowContentOverlay">@null</item>
    </style>

除了ActionBar之外,没有指定TextViewStyle或任何其他样式,因此您不需要修改主题。

所有其他风格都是由母主题夏洛克完成的__主题如你所见。这个主题基本上只是11以下API上的NoTitleBar主题。

<style name="Sherlock.__Theme" parent="android:Theme.NoTitleBar">
        <item name="android:windowContentOverlay">@null</item>
</style>

因此,这不会覆盖任何其他样式。

相关内容

  • 没有找到相关文章

最新更新