Note that there are some explanatory texts on larger screens.

plurals
  1. POApplying shadow and text color for Title and Menu Item in Sherlock Action bar
    text
    copied!<p>I am trying to achieve 2 things</p> <ol> <li>White Text for Menu Items, Title text color works</li> <li>Text Shadows for Title and Menu item</li> </ol> <p>All this on XML.</p> <p>What works, after experiments?</p> <ol> <li>Custom Action bar layout works just fine with shadows.</li> <li>Text color for all Tiles works but text shadow has no effect</li> <li><p>Text color for Menu item has no effect anywhere. In the example code when I declare MenuTextStyle in the main Theme tag, I am able to change text size but not color.</p> <pre><code>&lt;style name="Theme.SexyApp" parent="Theme.Sherlock.Light"&gt; &lt;item name="actionBarStyle"&gt;@style/Widget.SexyApp.ActionBar&lt;/item&gt; &lt;item name="android:actionBarStyle"&gt;@style/Widget.SexyApp.ActionBar&lt;/item&gt; &lt;item name="android:actionBarItemBackground"&gt;@drawable/list_state&lt;/item&gt; &lt;item name="actionBarItemBackground"&gt;@drawable/list_state&lt;/item&gt; &lt;item name="android:actionMenuTextAppearance"&gt;@style/Theme.SexyApp.ActionBar.MenuTextStyle&lt;/item&gt; &lt;item name="actionMenuTextAppearance"&gt;@style/Theme.SexyApp.ActionBar.MenuTextStyle&lt;/item&gt; &lt;/style&gt; &lt;style name="Widget.SexyApp.ActionBar" parent="@style/Widget.Sherlock.Light.ActionBar"&gt; &lt;item name="android:displayOptions"&gt;showHome|useLogo|showTitle&lt;/item&gt; &lt;item name="android:titleTextStyle"&gt;@style/Theme.SexyApp.ActionBar.TextAppearance&lt;/item&gt; &lt;item name="titleTextStyle"&gt;@style/Theme.SexyApp.ActionBar.TextAppearance&lt;/item&gt; &lt;/style&gt; &lt;style name="Theme.SexyApp.ActionBar.TextAppearance" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Title"&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;item name="android:textSize"&gt;20dp&lt;/item&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:shadowColor"&gt;#333333&lt;/item&gt; &lt;item name="android:shadowRadius"&gt;1&lt;/item&gt; &lt;item name="android:shadowDy"&gt;1&lt;/item&gt; &lt;/style&gt; &lt;style name="Theme.SexyApp.ActionBar.MenuTextStyle" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Menu"&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;item name="android:textSize"&gt;13dp&lt;/item&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:shadowColor"&gt;#333333&lt;/item&gt; &lt;item name="android:shadowRadius"&gt;1&lt;/item&gt; &lt;item name="android:shadowDy"&gt;1&lt;/item&gt; &lt;/style&gt; </code></pre></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload