HeaderTitle not applying localized style from values-ar/styles.xml

140 Views Asked by At

In my Android App I have added components for the arabic version like this:

values-ar

In the styles.xml I defined:

   <style name="HeaderImage">
    <item name="android:background">#193660</item>
    <item name="android:src">@drawable/logo_white_trans_96x96_300dpi</item>
    <item name="android:scaleType">fitStart</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
</style>

<style name="HeaderTitle">
    <item name="android:background">#193660</item>
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:textColor">#ffffff</item>
    <item name="android:textSize">25sp</item>
    <item name="android:gravity">right|center_vertical</item>
    <item name="android:paddingLeft">15dip</item>
</style>

When I launch the emulator (with arabic locale) the text alignment is correct but all the styles are set to default. No Image is displaying and it's just the standard gray bar.

The only difference in the values/styles.xml is the gravity "left". The other files have been copied. Can anyone tell me what I'm doing wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

It appears that I copied too many styles over to the "ar" directory. When I removed all the styles except the one in my code sample it used the Holo Theme again.