> Thanks for the info.  However, I still don't understand how to put an
> image on a toggle button.

You can't, at least not in the same fashion that you put an image on an
ImageButton.

Based on what I am seeing, you will need to:

1. Clone btn_toggle.xml from data/res/drawable from some Android SDK
platform directory into your project.

2. Clone all of the versions of btn_toggle_off.9.png and
btn_toggle_on.9.png (one per density) from data/res/drawable-* into your
project.

3. Apply your desired bitmap to the .9.png files, adjusting the nine-patch
border if needed.

4. Assign your @drawable/btn_toggle as the background for your ToggleButton.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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