Correct, this is not designed to allow you to modify it. There are a lot of serious optimizations (including calls into native code) that preclude it.
On Thu, Jul 2, 2009 at 7:22 PM, Yuchih <liuyuc...@gmail.com> wrote: > > Hi Dianne. Thanks for your answer. > I have traced some source codes. I think a new AttributeSet is needed. > First, I have to produce a XML from original AttributeSet with my > modification. > Then put this XML to XmlPullParser, and get new AttributeSet using > Xml.asAttributeSet(...). > But I have to modify obtainStyledAttributes() function (maybe more) in > Resources.Theme Class to deal with generic XML. > > It seems a big work..., am I right? > > Thanks, > > Yuchih > > > On 7月3日, 上午7時04分, Dianne Hackborn <hack...@android.com> wrote: > > Sorry, this is pretty much read-only. > > > > > > > > On Wed, Jul 1, 2009 at 11:05 PM, Yuchih <liuyuc...@gmail.com> wrote: > > > > > Is there a simple way to modify value in AttributeSet? > > > > > all i want to do is something like this: > > > in Button.java > > > > > public Button(Context context, AttributeSet attrs, int defStyle) { > > > > > /** > > > In origional XML, I have android:textSize="20sp". > > > Then do something to make textSize attr. value + 2sp. > > > The effect of this will make all button textSize bigger than original > > > setting. > > > **/ > > > super(context, attrs, defStyle); > > > } > > > > > Any suggestion is appreciated! > > > Thanks. > > > > -- > > 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. > > > -- 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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---