Unfortunately the 'default' color for the text on all of the default generated slides for the AppIntro Library is White - which in my case, simply doesnt show up very well..
Is it possible to programmatically set the Text Color for the entire current Activity, WITHOUT using any xml/theme/style files?
I'm specifically looking to do this purely programmatically -- NO XML..
...Similar to the way we can define the color of the NavBar, ActionBar, StatusBar, Activity Background, etc. etc.. Surely there must be a way to set the color of all the Text for an entire Activity all at once (without using xml)..?
Thanks in advance!
Asked
Active
Viewed 328 times
1

StudioB
- 117
- 9
-
1The principal approach for this would be to find all the widgets that you want to change, then changing them individually. An activity has no idea what text there is. – CommonsWare Oct 16 '16 at 15:51
-
@CommonsWare You are absolutely correct.. But unfortunately, I am using an intro/slides Library called AppIntro, which dynamically creates slides for me (which I can manipulate to an extent), but I'm unsure of how to identify the Title and Description Text ID's for all 5 of my slides (which, again, were created dynamically using a library).. Is there a way to programmatically GET the names of all these textviews? If so, it would be a huge help.. Otherwise, I was assuming there would be a simple programmatic way to "get" the activity, and then "set" the text color for it as a whole.. But :\ – StudioB Oct 16 '16 at 22:03
-
1"Is there a way to programmatically GET the names of all these textviews?" -- you can't get the names very readily. You can scan through all the views and look for those that are `instanceof TextView`. The approaches that you see for [recursively setting the typeface on all `TextView` widgets](http://stackoverflow.com/q/10766716/115145) could be adapted. I have no idea if this library is using `TextView`, though, versus `WebView`, drawing text directly on a `Canvas`, etc. – CommonsWare Oct 16 '16 at 22:21
1 Answers
0
Define your stye and then apply it to the application/activity in manifest.
Check this question

Community
- 1
- 1

Gheorghe Vlad
- 31
- 4
-
Check THIS Question.. I'm clearly asking for a way to do it WITHOUT applying an external style/theme from an xml (which is what you're suggesting).. I am using an Intro/slide Library called AppIntro, which allows me to dynamically create slides (and manipulate them to an extent) but unfortunately I dont know how to identify the Title and Description text for each of my 5 slides in order to do it programmatically.. This is why I am asking for a way to apply a text-color to an entire activity programmatically.. – StudioB Oct 16 '16 at 21:59