I'm not sure what this has to do with skinning. I don't know of any applications that scan for different resources for a skin; rather, you create a skin by replacing the existing (layout, drawable, etc) resource with a different one.
On Sun, Aug 23, 2009 at 2:18 PM, Spektor Yaron <[email protected]> wrote: > Hi, > i know it is done somehow by other applications (for example adding new > skins to an existing application w/o knowing the name of the layout ahead of > time) > what am i missing here. is this not the way to do it? > should i copy all resources to the file system and read them from there? > would that make sense? would i be able to inflate a view with them this way? > Thanks, > > On Sun, Aug 23, 2009 at 6:44 PM, Dianne Hackborn <[email protected]>wrote: > >> I don't believe there is any way to do that from an application. From a >> desktop, you can use the aapt dump commands to find out about the contents >> of the .apk. >> >> >> On Sun, Aug 23, 2009 at 8:15 AM, Spektor Yaron <[email protected]>wrote: >> >>> Hi, >>> i was able to play around with the resource on a different apk and get >>> them using createPackageContext as you suggested. >>> here is an example of the code: >>> otherAppContext = >>> this.createPackageContext("com.android.demo.notepad2",Context.CONTEXT_INCLUDE_CODE >>> + Context.CONTEXT_IGNORE_SECURITY); >>> int resID = otherAppContext.getResources().getIdentifier("icon", >>> "drawable", "com.android.demo.notepad2"); >>> >>> this works well. >>> now i am trying to get ALL the drawables (or all the layouts) in this >>> package. i tried a multitude of ways including reflection and AssetManager >>> but was unsuccessful. any tips here? >>> just to be clear i can not use R.drawable.icon as this is a different >>> context >>> >>> -- >>> Yaron Spektor >>> >>> >>> >> >> >> -- >> Dianne Hackborn >> Android framework engineer >> [email protected] >> >> Note: please don't send private questions to me, as I don't have time to >> provide private support, and so won't reply to such e-mails. All such >> questions should be posted on public forums, where I and others can see and >> answer them. >> >> >> >> > > > -- > Yaron Spektor > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

