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 <[email protected]> wrote: > Sorry, this is pretty much read-only. > > > > On Wed, Jul 1, 2009 at 11:05 PM, Yuchih <[email protected]> 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 > [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 -~----------~----~----~----~------~----~------~--~---

