Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. Try below code ,You can also inclue textview inside it,
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:orientation="vertical" >
  8.  
  9. <LinearLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. android:orientation="horizontal" >
  13.  
  14. <EditText
  15. android:layout_width="0dp"
  16. android:layout_height="wrap_content"
  17. android:layout_weight="0.55"
  18. android:background="@drawable/selector"/>
  19.  
  20. <EditText
  21. android:layout_width="0dp"
  22. android:layout_height="wrap_content"
  23. android:layout_weight="0.15"
  24. android:background="@drawable/selector"/>
  25.  
  26.  
  27. <EditText
  28. android:layout_width="0dp"
  29. android:layout_height="wrap_content"
  30. android:layout_weight="0.30"
  31. android:background="@drawable/selector"/>
  32. </LinearLayout>
  33.  
  34. <LinearLayout
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content"
  37. android:orientation="horizontal"
  38. >
  39.  
  40. <EditText
  41. android:layout_width="0dp"
  42. android:layout_height="wrap_content"
  43. android:layout_weight="0.20"
  44. android:background="@drawable/selector"/>
  45.  
  46. <EditText
  47. android:layout_width="0dp"
  48. android:layout_height="wrap_content"
  49. android:layout_weight="0.20"
  50. android:background="@drawable/selector"/>
  51.  
  52. <EditText
  53. android:layout_width="0dp"
  54. android:layout_height="wrap_content"
  55. android:layout_weight="0.60"
  56. android:background="@drawable/selector" />
  57. </LinearLayout>
  58.  
  59. </LinearLayout>
  60.  
  61.  
  62. where selector drawable is xml file inside xml folder
  63.  
  64. selector.xml
  65.  
  66. <?xml version="1.0" encoding="utf-8"?>
  67. <shape
  68. xmlns:android="http://schemas.android.com/apk/res/android"
  69. android:shape="rectangle">
  70.  
  71. <solid android:color="@android:color/white" />
  72.  
  73.  
  74. <stroke
  75. android:width="1dp"
  76. android:color="@android:color/black"
  77. />
  78.  
  79.  
  80. <padding
  81. android:left="5dp"
  82. android:right="5dp"
  83. android:top="5dp"
  84. android:bottom="5dp" />
  85. </shape>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement