EditText with maxLines - how to show half of top line

20 Views Asked by At

In my layout there is EditText with android:maxLines="4".
And when text exceeds 4 lines, strongly last 4 lines are shown in EditText.
This is by design.
enter image description here

But how can I show 4 and half lines? Like this
enter image description here

1

There are 1 best solutions below

0
Alexey On

After short have found solution. Just add to layout

app:layout_constraintHeight_max="87dp"

You should be find suitable value of the attribute experimentally, depending on maxLines and fontSize in your case.