MaterialDesignLibrary icon indicating copy to clipboard operation
MaterialDesignLibrary copied to clipboard

Last letter on a new line

Open ArtemNurtdinov opened this issue 8 years ago • 6 comments

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: default

With some other text: 1 2

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?

ArtemNurtdinov avatar May 24 '16 07:05 ArtemNurtdinov

Add android:line=1

muhammedakiftas avatar May 24 '16 08:05 muhammedakiftas

added textButton.setLines(1); result: default

ArtemNurtdinov avatar May 24 '16 08:05 ArtemNurtdinov

textButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15); if I delete this code, it looks normal. But I need this 15sp size...

ArtemNurtdinov avatar May 24 '16 08:05 ArtemNurtdinov

Hmm, Text change, Old : Button.setText = "sometext"; Now : Button.setText = " sometext ";

muhammedakiftas avatar May 24 '16 08:05 muhammedakiftas

Button.setText = " sometext "; default problem is not in this code: textButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15); tried without it, and the result was: 1

ArtemNurtdinov avatar May 24 '16 08:05 ArtemNurtdinov

thanks

hojatdelfan avatar Sep 20 '16 14:09 hojatdelfan