Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. tools:context=".MainActivity"
  8. android:orientation="vertical">
  9.  
  10. <TextView
  11. android:layout_width="wrap_content"
  12. android:layout_height="wrap_content"
  13. android:text="Hello World!"
  14. app:layout_constraintBottom_toBottomOf="parent"
  15. app:layout_constraintLeft_toLeftOf="parent"
  16. app:layout_constraintRight_toRightOf="parent"
  17. app:layout_constraintTop_toTopOf="parent" />
  18.  
  19. <TableLayout
  20.  
  21. android:layout_width="match_parent"
  22.  
  23. android:layout_height="match_parent"
  24.  
  25. android:id="@+id/tbl1" >
  26.  
  27. <!-- first row -->
  28.  
  29. <TableRow
  30.  
  31. android:layout_width="wrap_content"
  32.  
  33. android:layout_height="wrap_content"
  34.  
  35. android:id="@+id/tbr1"
  36.  
  37. android:padding="5dp">
  38.  
  39. <TextView
  40.  
  41. android:text="Column1"
  42.  
  43. android:textSize="20dp" />
  44.  
  45. <TextView
  46.  
  47. android:text="Column2"
  48.  
  49. android:textSize="20dp" />
  50.  
  51. </TableRow>
  52. <!-- edit span 2 columns -->
  53.  
  54. <TableRow
  55.  
  56. android:layout_width="wrap_content"
  57.  
  58. android:layout_height="wrap_content"
  59.  
  60. android:id="@+id/tbr2"
  61.  
  62. android:padding="5dp">
  63.  
  64. <EditText
  65.  
  66. android:text="Column 1+2"
  67.  
  68. android:layout_span="2"/>
  69.  
  70. </TableRow>
  71. <View
  72.  
  73. android:layout_height="2dp"
  74.  
  75. android:background="@color/colorAccent"/>
  76.  
  77. <Button
  78.  
  79. android:text="Column3"
  80.  
  81. android:textSize="20dp" />
  82.  
  83. <Button
  84.  
  85. android:text="Column2"
  86.  
  87. android:textSize="20dp"
  88.  
  89. android:layout_column="1" />
  90.  
  91. </TableLayout>
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement