0

I want to style all the hundreds of textviews that I've created over dozens of file using a global style. how can i do this?

hunterp
  • 15,716
  • 18
  • 63
  • 115

2 Answers2

3

You need to create separate style resources in /res/values/style.xml

here is a sample style

<style name="style_title">
    <item name="android:textColor">#ffffffff</item>
    <item name="android:textSize">18dip</item>
    <item name="android:shadowColor">#000000</item>
    <item name="android:shadowDx">1</item>
    <item name="android:shadowDy">1</item>
    <item name="android:shadowRadius">2</item>
</style>

You can find more info here : http://developer.android.com/guide/topics/ui/themes.html

Ravi Vyas
  • 12,212
  • 6
  • 31
  • 47
1

The answer can be found here. Maybe even a few additional chunks of info.

Setting global styles for Views in Android

Community
  • 1
  • 1
sealz
  • 5,348
  • 5
  • 40
  • 70