I want to create an theme apk which has styles for view elements (Button, EditText,...) and use those styles in my other apps. So if I want to update the UI, i will only need to update the theme apk, and my other apps will be automatically updated. But I still not find out the way to do this. Is it possible?
Asked
Active
Viewed 2,469 times
2 Answers
3
Actually after digging around, I came up with this Is it possible to access resources in another APK without using content providers? The basic answer for my question is get the resources from the theme-apk and use them in others. The hard part is how to deal with the theme resources ID (which are stored in R.java) and how to organize the other apps in an abstract way to work with the theme-apk.
1
Have you tried creating an Android Library and use them in your other projects?

Lukas Knuth
- 25,449
- 15
- 83
- 111
-
Yes I know about Android library as well. You missunderstood my questions. If I use the Android library for the theme apk, when I update it I also need to re-install my other apps (to see the change of UI). My point is I only need to re-install the theme apk, and the others change automatically. – Anh Tuan Oct 10 '11 at 07:57
-
1So you want to dynamically get the UI-parameters from your Theme-APK? I'm not sure if this is possible. Also, users would need to install your Theme-APK to probably show your apps. A better idea would be including the theme-library in every app. – Lukas Knuth Oct 10 '11 at 08:07
-
Yes I think it is possible. Go Launcher is an example, they can use theme from other apks. But how ^_^ – Anh Tuan Oct 10 '11 at 08:19