The development of Android is really fast, there are many new things every year, it is unlikely to want to cover all the new things, I am here to talk about major Android major new technology development, actually understand the development trend of Android, may be more helpful to developers.
Development Tools
- Android Studio: Google officially abandons Eclipse and Android studio popularity. As although not new, but the Android Studio this software update speed is amazing, there are a lot of new features released. For example, support many annotation code hint annotations, live code template, support auto-generated parcelable implementation and so on, as a developer, continue to follow this update list recent changes, will make your code of life better.
- Android Ijiami: Developers face at present very much to the app is stolen source code, implanted malicious virus, add ads through two times packaging become pirated products into the channel, not only directly lead to the work of the developer's fruits stolen, creative plagiarism, the interests of serious damage, Results in a drop in app user experience or a direct economic loss. http://www.ijiami.cn/
the realization of the replacement skin function of Android application
We can make a skin pack into an apk file and read the data from the skin pack in the app apk.
apply apk to read Skin pack apk data Condition
1. With the same signature
2. Configuring Android:shareduserid in Androidmanifest.xml has the same attribute value
To meet the above criteria, two apk will be able to access the data with each other.
steps to implement a skin-changing feature for Android apps
1, application and skin programs in the Androidmanifest.xml configuration
xml/html Code
- android:shareduserid="Com.yee"
2, apply apk and skin apk in the same function of the skin file name to match
Example: App apk image path: \res\drawable-hdpi\xx.png
The image file path in the skin apk should also be: \res\drawable-hdpi\xx.png
3. Get Skin Resources
Java code
- Context context = Createpackagecontext ("Com.yee.skin", context.context_ignore_security);
Get to the skin pack com.yee.skin corresponding to the context, by returning the context object you can access to the skin APK package Com.yee.skin any resources.
In the app apk you want to get the Buttonbackground.png code in the skin apk as follows
Java code
drawable drawable = Context.getresources (). getdrawable (R.drawable.buttonbackground);
APK share: Android App replacement skin function implementation Ideas Tutorial.