I have an editText with layout:
<EditText
android:id="@+id/edittext"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="test"
android:layout_margin="5dp"
android:gravity="left|center_vertical"
android:lineSpacingExtra="10dp"
android:lineSpacingMultiplier="1"
/>
but the text is not centered vertically because of lineSpacingExtra
. Here is how it looks:
how to make it so I keep lineSpacingExtra
tag but have text centered vertically?
I found a way to simulate this but not an actual solution. You can add padding top but it's not a safe solution.
<EditText
android:id="@+id/edittext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:paddingTop="18dp"
android:gravity="left|center_vertical"
android:lineSpacingExtra="10dp"
android:lineSpacingMultiplier="1"
android:text="test" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With