MaterialDesignLibrary
MaterialDesignLibrary copied to clipboard
Last letter on a new line
I have this button:
<design.ButtonRectangle android:id="@+id/btnGoReg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:text="@string/go_reg" android:layout_marginBottom="5dp" android:background="@color/sky"/>
And I don't understand, why it looks like that:
With some other text:
I tested it on my device with 5.0.1 and it looks normal. Screenshots from Emulators with 4.2.2 and 4.0.1. Can somebody explain me please how to fix this problem?
Add android:line=1
added
textButton.setLines(1);
result:
textButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
if I delete this code, it looks normal.
But I need this 15sp size...
Hmm, Text change, Old : Button.setText = "sometext"; Now : Button.setText = " sometext ";
Button.setText = " sometext ";
problem is not in this code:
textButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
tried without it, and the result was: