Android Question Change RadioButton Colors

inakigarm

Well-Known Member
Licensed User
Longtime User
Hi:

I'm not finding how to change the radiobutton color to the desired one (black or whatever colour I choose).
(attached an example from @stevel05 for changing the rbt colors creating Rbt with canvas but resolution is worse than original Rbt)

I've found another Android Snippet that change Checkbox colour from Erel but it can't be applied to Rbt (https://www.b4x.com/android/forum/threads/change-checkbox-colors.105575/

Somebody knows how to change the tint colour of Rbt ? found some info on stackoverflor (https://stackoverflow.com/questions/17120199/change-circle-color-of-radio-button-android)

Thanks
 

Attachments

  • RBTest.zip
    8.5 KB · Views: 368

inakigarm

Well-Known Member
Licensed User
Longtime User
My fault, I thoguth Radiobutton was another control class ! (trying many options it seems that I haven't tried the most obvious...)
upload_2019-6-2_10-37-24.png


And the code in https://www.b4x.com/android/forum/threads/change-checkbox-colors.105575/ changes to:

B4X:
For Each v As View In Activity.GetAllViewsRecursive
   If v Is RadioButton Then
       SetButtonTintList(v, Colors.Red, Colors.Black)
   End If
Next
 
Last edited:
Upvote 0
Top