Style Editor - dynamically create and apply styles

I am developing a text reader application. I am trying to increase the settings for my users to customize the look of the text and the application itself. Creating multiple styles in my resources folder and including them at runtime seems simple enough using view constructors that accept a style parameter.

However, I am also considering taking another step and creating a style editor in my application that allows users to fully control their experience.

I think that in principle using Android styles is out of the question, since style identifiers are generated at compile time. I am considering creating custom views that are lightweight wraps around the views that I need, using the AttributeSetview designer to apply my styles.

How do I dynamically create and apply styles to my views?

+3
source share
1 answer

, , , :-) Android , . , , , , AtrributeSet HashTable , .

+1

All Articles