android - Multiple lines on a button -
android - Multiple lines on a button -
list item
i want create button 1 image , more 2 lines of text. possible in xml? (eclipse)
i`m trying code:
android:id="@+id/itm1" android:text="item1" android:typeface="sans" android:textsize="20sp" android:textcolor="#ffffff" android:width="250dip" android:height="150dp" android:drawableleft="@drawable/image1" android:background="@android:color/transparent" android:layout_marginleft="80dp"/>
to insert multiple lines in button, might utilize string.xml insert end of line.
1 create new variable character endofline "\n" in res/values/strings.xml. example:
<string name="multiplelines">line1 \n line2</string>
2 refer in layout file. example, button:
<button android:id="@+id/start" android:text="@string/multiplelines" android:layout_height="wrap_content" android:layout_width="fill_parent"> </button>
source: http://www.jiahaoliuliu.com/2011/10/android-multiple-lines-for-layout.html
android android-button
Comments
Post a Comment