开发者

Android - Create a theme apk to use in other apps

开发者 https://www.devze.com 2023-04-12 10:18 出处:网络
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,

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 no开发者_如何转开发t find out the way to do this. Is it possible?


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.


Have you tried creating an Android Library and use them in your other projects?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号