EditText lineSpacingExtra weird behavior

I have an EditText with the lineSpacingExtra parameter equal to 8dp. When I open a page with this EditText and predefined text, line spacing works fine. But when on the same page I click on the end of the EditText and start typing, the line spacing seems to be ignored.

Is this a mistake or am I missing something?

enter image description here

Added code snippet. In my opinion, there is nothing special about this.

<EditText android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent" android:padding="8dip" android:scrollbars="vertical" android:fadingEdge="vertical" android:gravity="top" android:lineSpacingExtra="8dip" android:lineSpacingMultiplier="2" android:textSize="18sp" android:capitalize="sentences" android:inputType="textCapSentences|textMultiLine" /> 

update: it looks like the error appeared with Android 5 Lollipop

+7
android android-5.0-lollipop android-edittext line
source share
2 answers

this is the error that was posted: https://issuetracker.google.com/issues/37009353 , I find the fix method: this error only occurs when typing in the last line so that you can add an empty line to the last.

+1
source share

Take one network line as shown below: -

android:lineSpacingMultiplier

acts as a scale factor for the height of the line space. in other words, each line height*multiplier + extra will be height*multiplier + extra

+1
source share

All Articles