Reputation: 145
It's different with other android version below 5.0! Demo code:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="100dp"
android:text="Hello World!"/>
But if textview has more than two lines, they show the same! How can I do to make them show the same on different os version? Help!
Upvotes: 1
Views: 1107
Reputation: 150
you can set a paddingBottom
to the view over Lollipop like
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="100dp"
android:text="Hello World!"
android:paddingBottom="@dimen/padding"/>
and set padding=0dp
in the dimens
(values-v19) and set padding=100dp
in the dimens
(values-v21)
Upvotes: 1