Android: text button disordered and cut when more than 1 line -



Android: text button disordered and cut when more than 1 line -

i having problem text in button. when text more 1 line, size of button shortened above , text not appear in center , cutting bottom.

what can problem?

xml

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear_botones" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <button android:id="@+id/boton_monumento_1" android:layout_width="100dp" android:layout_height="45dp" android:layout_marginright="1dp" style="@style/botonmonumentos" /> <button android:id="@+id/boton_monumento_2" android:layout_width="100dp" android:layout_height="45dp" android:layout_marginright="1dp" style="@style/botonmonumentos" /> </linearlayout>

styles

<style name="botonmonumentos"> <item name="android:textsize">13sp</item> <item name="android:ellipsize">end</item> <item name="android:gravity">center</item> <item name="android:maxlines">2</item> </style>

change height of button from

android:layout_height="45dp"

to

android:layout_height="wrap_content"

android button text size

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -