0

I have a Sherlock Action Bar with Theme DarkActionBar so I can get the white search Icon in the Action Bar.

But, when I did that the submenu of my contextMenu (that is decided with a popUp - like an AlertDialog) the theme of this dialog is being dark like its parent, and I want it Light.

How should I do that? Get the white search icon (dark theme) and the Light theme for the context menu option ?

This is my styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="StyledIndicators" parent="@style/Theme.SherlockCustom">
      <item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
      <item name="vpiTabTextStyle">@style/CustomTabPageIndicator.Text</item>
    </style>

    <style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator">
        <item name="android:background">@drawable/custom_tab_indicator</item>
    </style>
    <style name="CustomTabPageIndicator.Text" parent="Widget.TabPageIndicator.Text">
        <item name="android:textColor">#FF555555</item>
    </style>
    <style name="CustomTheme.TitleActionBar" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Title">
        <item name="android:textColor">#FFFFFF</item>
    </style>
    <style name="CustomTheme.ActionBarStyle" parent="Widget.Sherlock.ActionBar">
        <item name="background">@drawable/gradiente_titlebar</item>
        <item name="android:background">@drawable/gradiente_titlebar</item>
        <item name="titleTextStyle">@style/CustomTheme.TitleActionBar</item>
        <item name="android:titleTextStyle">@style/CustomTheme.TitleActionBar</item>
    </style>
    <style name="Theme.SherlockCustom" parent="@style/Theme.Sherlock.Light.DarkActionBar">
        <item name="actionBarStyle">@style/CustomTheme.ActionBarStyle</item>
        <item name="android:actionBarStyle">@style/CustomTheme.ActionBarStyle</item>
        <item name="spinnerDropDownItemStyle">@style/Theme.Sherlock.Light</item>
        <item name="android:spinnerDropDownItemStyle">@style/Theme.Sherlock.Light</item>
        <item name="spinnerItemStyle">@style/Theme.Sherlock.Light</item>
        <item name="android:spinnerItemStyle">@style/Theme.Sherlock.Light</item>
        <item name="popupMenuStyle">@style/Theme.Sherlock.Light</item>
        <item name="android:popupMenuStyle">@style/Theme.Sherlock.Light</item>
        <item name="actionDropDownStyle">@style/Theme.Sherlock.Light</item>
        <item name="android:actionDropDownStyle">@style/Theme.Sherlock.Light</item>
        <item name="android:alertDialogStyle">@style/Theme.Sherlock.Light</item>
    </style>
</resources>
Gabriel Bastos
  • 540
  • 1
  • 7
  • 16

1 Answers1

2

Found the answer at https://stackoverflow.com/a/15219098/1574617.

Just added that to code so now I can decide which widget search I want to use. Thanks ASP for answer.

<style name = "Theme.SherlockCustom" parent = "@style/Theme.Sherlock.Light">
    <item name = "actionBarWidgetTheme"> @style/Theme.Sherlock.Light.DarkActionBar </item>
    <item name = "android:actionBarWidgetTheme"> @style/Theme.Sherlock.Light.DarkActionBar </item>

    <item name = "actionBarStyle"> @style/CustomTheme.ActionBarStyle </item>
    <item name = "android:actionBarWidgetTheme"> @style/CustomTheme.ActionBarStyle </item>  
</style>

Thanks ASP for answer.

Community
  • 1
  • 1
Gabriel Bastos
  • 540
  • 1
  • 7
  • 16