Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Try below code ,You can also inclue textview inside it,
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.55"
- android:background="@drawable/selector"/>
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.15"
- android:background="@drawable/selector"/>
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.30"
- android:background="@drawable/selector"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:background="@drawable/selector"/>
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:background="@drawable/selector"/>
- <EditText
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="0.60"
- android:background="@drawable/selector" />
- </LinearLayout>
- </LinearLayout>
- where selector drawable is xml file inside xml folder
- selector.xml
- <?xml version="1.0" encoding="utf-8"?>
- <shape
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="@android:color/white" />
- <stroke
- android:width="1dp"
- android:color="@android:color/black"
- />
- <padding
- android:left="5dp"
- android:right="5dp"
- android:top="5dp"
- android:bottom="5dp" />
- </shape>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement