开发者

Language resources in separate APK?

开发者 https://www.devze.com 2022-12-28 13:19 出处:网络
I\'m wondering if it is possible to create a separate APK file which contains only language specific strings and somehow persuade my program to try to read the string resources first from that package

I'm wondering if it is possible to create a separate APK file which contains only language specific strings and somehow persuade my program to try to read the string resources first from that package's resource and then from the program's own resources... I would like to have a main program with 2-3 mayor laguages and the rest of the languages would go into a separate language pa开发者_运维百科ck. (This is to keep the main program size small as I have already 12 translations)


You can access another APK's resources through the PackageManager and getResourcesForApplication(). That will allow you to access those strings.


Look at this tutorial page for using library resources - it may help you acheive a shared resources model. Note that android SDK 2.0 and pre-1.5 are not capable of creating libraries for some reason. http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

0

精彩评论

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