I had two textview in a linearlayout. In one textview, text contains 21 characters and in another textview, text contains only 12 characters. The first textview is shown in two lines and the second textview is shown in single line. I want both textview text should be same either in single or double line.
I used the following code:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" >
<TextView
android:id="@+id/tvtextview1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_margin="1dp"
android:layout_weight="1"
android:inputType="textMultiLine"
android:scrollHorizontally="false"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="16sp" >
</TextView>
<TextView
android:id="@+id/tvtextview2"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_margin="1dp"
android:layout_weight="1"
android:scrollHorizontally="false"
android:gravity="center"
android:inputType="textMultiLine"
android:textColor="#FFFFFF"
android:textSize="16sp">
</TextView>
</LinearLayout>
Can anyone please help me to solve this? Thanks in advance.
add
android:minLines="2"in both<TextView>tags.