Android Question Color of vertical scroll indicator not changing

dbprogramer

Member
Licensed User
Longtime User
Using previous versions of B4A my scrollview (in my program) automatically displayed the temporary indicator (that shows up only while you are scrolling) in a contrasting color. Now (B4A version 7.80) the indicator is always dark, and when I change the color of the scrollview (for "night reading"), the indicator remains dark and not really visible (it is there though); I did some other revisions in my code too, so not sure what could have cause this change (mainly, adding an AppCompat ACToolBarLight and all the changes required for that, such as some changes in the manifest). What could cause this no longer to automatically change to a contrasting color? (My code is quite large and access other files so I can't really upload it for an example). Thanks for any suggestions.
 

dbprogramer

Member
Licensed User
Longtime User
I already tried several different values for the targetSdkVersion with no change. Also tried changing these (the only specified values in the manifest) -- to no avail:
<item name="colorPrimary">#03A9F4</item>
<item name="colorPrimaryDark">#0288D1</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>

Where can I learn about other "items" I can specify? I am assuming that in the "parent" theme there might be something specified:
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">

But I don't know how to find out. Again, it works fine if the color is light, but when scrollview is dark, then the indicator is also dark (looks darker when the background is dark than it looks when the background is light). What is that thing even called -- a scroll indicator?
 
Upvote 0

dbprogramer

Member
Licensed User
Longtime User
Can those themes be changed on the fly? I give the user the option to select night reading screen if they want. I figured since it was declared in the manifest it can't be changed. I see in the link you gave that "individual views" can have their own themes, so that might be the solution, but I can't see how to apply that to a view in my program. I tried changing (in the manifest) to "Theme.AppCompat.Dark.NoActionBar" just to see if it made a difference but it gave an error and wouldn't compile -- obviously that is not a valid name (I just took the original example posted and pasted it into my program (and it worked), but I don't know where to find other options). Thanks for your help.

Edited: Okay, I found that by changing in the manifest the entry "Theme.AppCompat.Light.NoActionBar" to "Theme.AppCompat.NoActionBar" the situation totally reverses and the night screen shows the scroll indicator and now the daylight screen doesn't. Is there a way to allow for both? Do I only have the option of Light or Dark and not both?

Edited: Adding this entry to the manifest changes the color of the scroll indicator (among other things): <item name="colorControlNormal">#whatevercolor</item>
But can this be changed somehow while the program is running?
 
Last edited:
Upvote 0
Top