Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Write Multiline Text on Button in Android

I want to know, How to write Multiline Text on Button

 <Button
    android:id="@+id/button1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="100dp"
    android:background="@drawable/layout_border"
    android:text="Hours   Mon - sat 5pm" />

I am getting like this:-

enter image description here

but required this kind of button:-

enter image description here

Edited::--

Now i got something like this, by using answer given by, @Sino K D :

enter image description here

but still looking for help,

After adding drawable to left side, getting this:-

enter image description here

like image 766
Sun Avatar asked Oct 31 '13 06:10

Sun


1 Answers

Use &#10; (new line)

android:text="Hours&#10;Mon - sat 5pm"
like image 60
Linga Avatar answered Oct 03 '22 03:10

Linga