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,261
  • 18
  • 58
  • 110

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
  • 11,992
  • 6
  • 30
  • 45
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,262
  • 5
  • 38
  • 70