Q:

two lines in a button text with different sizes

I found reference by googling that led me to think the following would give me 2 lines of text in a button, first line normal size and second line smaller.   However it just wraps all the copy and in the same size.   any suggestions please?  This is the line in my strings.xml
<string name="teststr"> String I am testing\n <small><small>(with a sub comment)</small></small></string>

A:

You can use 
myButton.setText(Html.fromHtml("String I am testing<br/><small>(with a sub comment)</small>")); 

or to read the string from your strings.xml
myButton.setText(Html.fromHtml(getString(R.string.teststr)));

Remember that you need to use <br/> instead of \n to get a new line.

A:

You can solve it by setting the string recource similar to what you suggested in your question:
For example
<string name="button_text"><font size="20">First line!</font>\n\<font size="10">Second line!</font></string>

The  will change the size of the text and the \n\ will put the following text on the next line.
Then in your XML you as usual call
android:text="@string/button_text"

Hope this will help furure readers

