Wednesday, June 8, 2011

[android-developers] Re: Use of the Resource reference "?" when setting widget attributes.

I think that may be where we're getting mixed up.

I've created a style tree that follows the SDK recommendations like
this. It follows inheritance, using the "." notation, just like the
examples in the SDK

MyCompanyStyle
|
MyCompanyStyle.Header
| |
| MyCompanyStyle.Header.Bold
|
MyCompanyStyle.Footer
| |
| MyCompanyStyle.Footer.Bold
|
MyCompanyStyle.etc


Previously, at the individual View and ViewGroup level, I set the
styles of the Views as shown previously with "style="@style/
MyCompany.Footer.Bold"

What I'd like to do is to change the individual attributes of the
style, for instance the sizes, fonts, colors and whatnot within the
"MyCompany" style tree at application startup time while still keeping
the "style=xxxx" notation within the Views and ViewGroups in my
layouts.

How can I change the style elements within the "MyCompany" tree?
Alternatively, how can I create two style trees "MyCompany_Style_A"
and "MyCompany_Style_B", and have the Views and ViewGroups reference
whichever one is currently selected? Should I just have multiple
layouts and inflate them within onCreate()?

It seems that the entire Theme / Style model relies on starting at one
fixed point and branching out. Is there any way I can let the style
referenced in the Views be a variable rather fixed?

Thanks for the help, I really appreciate it.

DD

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment