I found a way that works perfectly! 1. Use a regular ToggleButton 2. Set your desired drawable on the toggle button using either drawable_top or drawable_bottom. Don't use left or right as the image won't be centered. 3. Now, you have both the text and an image. I just wanted the image so I needed a way to remove the text. I tried many different techniques like setting the font size to 0 or the text on and off to empty string, but there was always something wrong. The option that works is to set the lines=0 causing the text to take up 0 lines (making it disappear) leaving just the nicely centered image!
On Jan 20, 9:19 pm, Sasikumar S <sasikumar.it1...@gmail.com> wrote: > see this > > http://www.androidpeople.com/category/button/ > > On Jan 21, 1:12 am, Eric Crump <synesthe...@gmail.com> wrote: > > > I want to put animageon a ToggleButton. If I use android:background > > to set theimagethen it doesn't look like abuttonany more, just the > >image. What am I missing? Thanks. -- 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