ymruan wrote:
> hey guys.
> 
>     I met a problem in setting xml attribute at run time.
> 
> for example  I define a xml layout like this:
> 
> 
>     <TextView android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:text="@string/hello"
> android:drawableLeft="@drawable/icon"
> />
> 
> I want to set  android:drawableLeft="@drawable/icon" at runtime.But
> thers has no setter method for this attribute.

Yes there is: setCompoundDrawablesWithIntrinsicBounds().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 1.0 Available!

-- 
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

Reply via email to