My activity has a default theme. When I press a button I want to change the theme, but also want that the activity's state to remain unmodified (if I had some text in an editText, I want to see this text after I changed the theme)
Is this possible?
My activity has a default theme. When I press a button I want to change the theme, but also want that the activity's state to remain unmodified (if I had some text in an editText, I want to see this text after I changed the theme)
Is this possible?
Changing the style after creating the view is not supported .. so what you can do is:
Now when you are dynamically creating the new view you call the constructor that will allow to define a defStyle .. then you point to the style ID you have just created by pointing to R."the XML file name"."your style ID"