Sorry for the duplicate post, I couldn't see the thread for some reason. I figured I could set the resources conditionally through Java code, but I wanted to avoid this approach as in reality, I have many more resources than just a button and a background and I wanted to avoid having to maintain long lists of resources in code. I wanted to see if there was an easier/cleaner option first but if not I guess I'll go ahead and do it that way.
On Jun 27, 9:58 am, Kumar Bibek <[email protected]> wrote: > Set the values through code > > *Thanks and Regards, > Kumar Bibek* > *http://techdroid.kbeanie.comhttp://www.kbeanie.com* > > > > > > > > On Mon, Jun 27, 2011 at 2:26 PM, muckwarrior <[email protected]> wrote: > > I'm building an app, similar to a quiz app, which repeats > > functionality for different subjects. The layouts will be the same for > > each subject except that the resources used will different, e.g. > > Subject 1 will use ButtonImage 1 and Background colour 1, Subject 2 > > uses ButtonImage 2 etc. etc. > > > What I'm trying to avoid is duplicating the xml layouts. I initially > > assumed that I could use themes to avoid hardcoding the resourceIDs > > into the layout, but on further investigation that doesn't seem > > possible. Another approach I thought may have been possible was to use > > alternative resources folders and have a folder for each subject, but > > it doesn't seem possible to use custom qualifiers. > > > Can anyone tell me is it possible to specify multiple resources > > without creating multiple xml layouts? > > > -- > > 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 -- 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

