Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two text in button, title and subtitle

Tags:

android

button

Can we create some custom button with title and subtitle text in it.

Title in upper part of button and subtitle below it.

like image 228
Zoombie Avatar asked Jul 06 '11 13:07

Zoombie


1 Answers

You do not need any images the thing you need is styled text and here is simple and short way to do it

button1.setText(Html.fromHtml("<b><big>" + "Title" + "</big></b>" +  "<br />" + 
        "<small>" + "subtitle" + "</small>" + "<br />"));

You do not need to change any layout just add this text to your button

like image 190
Lukap Avatar answered Sep 19 '22 17:09

Lukap