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?
Asked
Active
Viewed 673 times
0
-
Your question makes no sense - explain more about what you are trying to do. – Squonk Jul 14 '11 at 19:19
-
watch it, i re edited, please remove your kill – hunterp Jul 14 '11 at 19:21
-
1+1 for caving to downvote pressure and this may help. http://stackoverflow.com/questions/3078081/setting-a-global-style-for-views-in-android – sealz Jul 14 '11 at 19:24
-
1harper your comment contains the correct answer. submit for points and answer? – hunterp Jul 14 '11 at 19:44
-
@hunterp: He ( @harper89 ) might not get your message unless you use the `@` symbol in front of his user name. – Devin Burke Jul 14 '11 at 19:54
-
1@hunterp was in a hurry so just posted real quick. Glad it helped. Upvote to give the link points :) – sealz Jul 15 '11 at 05:48
2 Answers
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.