Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying style dynamically

Tags:

android

themes

I'd like to dynamically apply styles to my views at runtime. Is there any method like View.setStyle(int style)?

Thanks

like image 547
Alexander Oleynikov Avatar asked Oct 14 '22 01:10

Alexander Oleynikov


1 Answers

There is no way at this time to set a Style dynamically. You might want to set all parameters for a style in one method and apply it to your View, but apart from that, there is no equivalent of a setStyle method. Check here for full discussion.

like image 59
Sephy Avatar answered Nov 11 '22 13:11

Sephy