I want to synchronize these views
Two TextView's height is 73 * 2 = 146
But, One TextView is 155.
I want to show same layout for these views.
Why these views are different?
Here is my code
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:bufferType="spannable"
android:ellipsize="end"
android:lineSpacingExtra="5.5dp"
android:textColor="@color/grey900"
android:textSize="15.5sp" />
Because it includes some situation,
as above will make different total height
with them.
In case 1 You use two TextView, total height depends on
textHeight*2 + padding-bottom*2 + padding-top*2 + margin-between-them
In case 2 You use single multiline TextView, total height depends on
textHeight*2 + padding-bottom + paddingTop + line-spacing
You can see that variables
make different height are padding
、margin
、line-spacing