I need to create this :
As you can see the lines not exactly centered with the text .
The problem ever bigger with Lower case text .
the text is to low , not centered in is own view
this is my code - The container is Linear Layout with
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:gravity="center"
android:orientation="horizontal
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="@color/gray_separator" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="How ?"
android:textColor="@color/gray_login_or"
android:textSize="26sp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:background="@color/gray_separator" />
i have tried with Relative Layout but this is not the problem , the problem and the solution in the TextView .
The best easy way to understand the problem is the different between lower and upper case...in upper case i have no problem .