Answer the question
In order to leave comments, you need to log in
Skins for android application
I've been fighting for a week now and I still can't solve this problem:
Let's assume that there is already a well-established interface of a certain program for android. At the same time, all layouts are rendered in xml. How can I now attach skins / skins / themes to this application that change background pictures and colors?
I’ll immediately note that the internal theme mechanism is not suitable for a fairly obvious reason: it is not possible to set different parameters for different instances of the same class. Those. if we set something like
<style name="someTheme" parent="android:style/Widget.Button">
<item name="android:background">@drawable/some_drawable</item>
</style>
then the specified background will be applied to all instances of the Button class, which is not allowed with the current layout. Resources.getDrawable(int)
It did not help in any way - the resources specified in xml are loaded bypassing this method.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question