hmm... I'm not looking to create two seperate buttons, rather I would
prefer to have a single button and change the drawable every time the
button is clicked.

On Dec 10, 5:50 am, H <[email protected]> wrote:
> I think I tried using the same setCompundDrawables... method but it
> didn't work for me either. Here's how I've got two different buttons in
> my xml (which you should be able to convert into java easily). The
> first is a button with an icon to the left and text in the button as
> well, the other button just has an icon on it only.
>
> <Button android:drawableLeft="@drawable/arrow_up" android:text="up"
> android:id="@+id/headerButtonUp"
> android:layout_gravity="left|center_vertical"
> android:onClick="viewClickButtonUpAFolder"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" />
>
> <ImageButton android:src="@drawable/house"
> android:id="@+id/headerButtonHome"
> android:gravity="center_horizontal|center_vertical"
> android:minWidth="50dip"
> android:layout_gravity="right|center_vertical"
> android:onClick="viewClickButtonHome"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" />

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