I'm also looking for how to have buttons with text using drawable,
instead of XML layout.

Can someone point me to some snippet or docs how to do it?

thanks
-pro

On Aug 27, 6:29 am, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > I have a additional question then.
> > If I want to specify a background color for thetextonly, how do I do
> > that?
>
> You can't.
>
> > When
> > I set android:background="#FF0000" I get a red color around both thetext
> > and the topDrawable.
>
> At most, as another poster suggested, you can have a different color be in
> the background of the topDrawable. Or,putthetextand image together as
> a bitmap (on-device or offline) and use ImageButton to display the
> combination.
>
> However, I suspect you do not want to be setting the background of 
> thebuttonvia android:background="#FF0000" in the first place. That should
> also remove all of your focus and touch highlighting, as they are part of
> the background.
>
> --
> 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 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to