<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/ll_code" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginRight="7dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/tv_code1" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:gravity="center" android:textColor="#2D2D2D" android:textSize="32sp" /> <View android:id="@+id/v1" android:layout_width="match_parent" android:layout_height="2dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:background="@color/user_main_theme_light" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:layout_marginRight="7dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/tv_code2" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:gravity="center" android:textColor="#2D2D2D" android:textSize="32sp" /> <View android:id="@+id/v2" android:layout_width="match_parent" android:layout_height="2dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:background="#CCC" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:layout_marginRight="7dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/tv_code3" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:gravity="center" android:textColor="#2D2D2D" android:textSize="32sp" /> <View android:id="@+id/v3" android:layout_width="match_parent" android:layout_height="2dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:background="#CCC" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/tv_code4" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:gravity="center" android:textColor="#2D2D2D" android:textSize="32sp" /> <View android:id="@+id/v4" android:layout_width="match_parent" android:layout_height="2dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:background="#CCC" android:baselineAligned="false" /> </LinearLayout> </LinearLayout> <EditText android:id="@+id/et_code" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignTop="@+id/ll_code" android:layout_alignBottom="@+id/ll_code" android:background="@android:color/transparent" android:cursorVisible="false" android:inputType="number" android:textColor="@android:color/transparent" /> </RelativeLayout>