HellerCommaA / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

accessing resources by aapk index from scripts in .apk #618

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What should be supported?

In order to make scripts distributed as .apk files behave more like native 
android applications, it would be nice to allow for looking up aapk compiled 
resource index from within the script and use the resources by referencing the 
index.

One such option would be to have a method for each type of resources, like 
below:

droid.getResourceIndexString["name"] translates to R.string.name
droid.getResourceIndexLayount["name"] translates to R.layout.name
droid.getResourceIndexId["myid"] translates to R.id.myid

droid.fullShowIndex(index) displays the contents of precompiled XML.
etc.

Such design would allow for development of GUI using native Eclipse Android 
tools, in addition to all the benefits of the compiled resources like 
compression, simplicity of internationalization and speed benefits.

Original issue reported on code.google.com by zele...@gmail.com on 4 Apr 2012 at 12:14