[android-developers] Re: how to implement Two line text with different colors on one button

2010-11-24 Thread pedr0
If your text will never change you can apply an image at your botton, in your image you can do that without problem. On 24 Nov, 14:57, xi developer xidevelope...@gmail.com wrote: In my android app development, I have one button, the button text is not a single color text, it is two lines

Re: [android-developers] Re: how to implement Two line text with different colors on one button

2010-11-24 Thread Richard Leggett
You can also use a SpannableStringBuilder. Here's a contrived example, but it shows the basics: TextAppearanceSpan span = new TextAppearanceSpan(mContext, R.style.MyTextAppearance); SpannableStringBuilder builder = new SpannableStringBuilder(); builder.append(First line\nSecond line);