Thanks Dianne for all your help,
i want to make sure i understand:
>it will be done very differently than what you are describing here (rather
would probably be something like the approach I was describing before).
meaning querying for the resource ids reliyng on thier sequential nature?
and then getting their resource name etc. from the getResourceEntryName(int
resid)

>for example you could just define the resource IDs that are in the skin and
what they should contain and not have to worry about any analysis of the
resources.

not sure i understand what you mean. how do you define the resource IDs? as
they are generated.
are you referring to "hard coding" the allowed names in Resources for each
skin? or maybe using the file system instead of the resources (would i be
able to inflate a layout the resides on the file system and not in
resources?)
What i would like to accomplish is to not know anything about the xml file
naming (i will need to know about "layout" and "drawable" etc.)

On Mon, Aug 24, 2009 at 8:18 AM, Dianne Hackborn <hack...@android.com>wrote:

> I'm sorry, I thought you were just bringing up skins as an example.  The
> platform currently doesn't support skinning, and when/if it ever does, it
> will be done very differently than what you are describing here (rather
> would probably be something like the approach I was describing before).  If
> you want to implement some kind of skinning for your app, you are on your
> own, and can do whatever you want.  And you really don't need to make this
> hard -- for example you could just define the resource IDs that are in the
> skin and what they should contain and not have to worry about any analysis
> of the resources.
>
>
> On Sun, Aug 23, 2009 at 5:15 PM, Spektor Yaron <spekt...@gmail.com> wrote:
>
>> Thanks Dianne, i appreciate your help.
>> firstly i am not even sure how to do the single skin version you
>> suggested, unless i state that the resources names must not change which is
>> something i am not eager to do.
>> secondly, i was thinking (in terms of skins) to allow multiple skins at
>> once. so the user selects one or more skins and can see them (lets say i
>> have one default skin and then i click on a "change skin" button and change
>> it to the next one in line).
>> so my idea (and hopefully i will be able to post it here soon for everyone
>> to use) was to take all the relevant apks based on the intent-filter, and
>> show them to the user to be able to choose from, thus creating a list of
>> skin, for this i need to load the resources for the drawable and the layout
>> etc. (again, skins are just an example) from all the apks i got back from
>> the search.
>> as i said earlier, i may be missing something and there may be a much
>> easier way to do it in android
>> Thanks,
>> Yaron
>>
>>
>> On Mon, Aug 24, 2009 at 3:03 AM, Dianne Hackborn <hack...@android.com>wrote:
>>
>>> 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 <spekt...@gmail.com>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 
>>>> <hack...@android.com>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 <spekt...@gmail.com>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
>>>>> hack...@android.com
>>>>>
>>>>> 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
>>> hack...@android.com
>>>
>>> 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
> hack...@android.com
>
> 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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to