Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.22 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout 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.  
  8. <TextView
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. android:text="Base textview"
  12. android:layout_marginStart="16dp"
  13. app:layout_constraintLeft_toLeftOf="parent"
  14. android:layout_marginLeft="16dp"
  15. android:layout_marginTop="16dp"
  16. app:layout_constraintTop_toTopOf="parent"
  17. android:background="@color/module_color_blue"
  18. android:id="@+id/textView"/>
  19. <TextView
  20. android:layout_width="0dp"
  21. android:layout_height="wrap_content"
  22. android:text="Smaller"
  23. app:layout_constraintTop_toBottomOf="@+id/textView"
  24. android:background="@color/red"
  25. app:layout_constraintLeft_toLeftOf="@+id/textView"
  26. app:layout_constraintHorizontal_bias="0.0"
  27. app:layout_constraintRight_toRightOf="@+id/textView"/>
  28.  
  29. </android.support.constraint.ConstraintLayout>
  30.  
  31. <?xml version="1.0" encoding="utf-8"?>
  32. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  33. xmlns:app="http://schemas.android.com/apk/res-auto"
  34. xmlns:tools="http://schemas.android.com/tools"
  35. android:layout_width="match_parent"
  36. android:layout_height="match_parent">
  37.  
  38. <TextView
  39. android:layout_width="wrap_content"
  40. android:layout_height="wrap_content"
  41. android:text="Base textview"
  42. android:layout_marginStart="16dp"
  43. app:layout_constraintLeft_toLeftOf="parent"
  44. android:layout_marginLeft="16dp"
  45. android:layout_marginTop="16dp"
  46. app:layout_constraintTop_toTopOf="parent"
  47. android:background="@color/module_color_blue"
  48. android:id="@+id/textView"/>
  49. <TextView
  50. android:layout_width="0dp"
  51. android:layout_height="wrap_content"
  52. android:text="Much longer that top textview"
  53. app:layout_constraintTop_toBottomOf="@+id/textView"
  54. android:background="@color/red"
  55. app:layout_constraintLeft_toLeftOf="@+id/textView"
  56. />
  57.  
  58. </android.support.constraint.ConstraintLayout>
  59.  
  60. <LinearLayout
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. android:orientation="vertical">
  64. <TextView
  65. android:layout_width="match_parent"
  66. android:layout_height="wrap_content"
  67. android:text="text1"/>
  68. <TextView
  69. android:layout_width="match_parent"
  70. android:layout_height="wrap_content"
  71. android:text="text2text2"/>
  72. </LinearLayout>
  73.  
  74. <?xml version="1.0" encoding="utf-8"?>
  75. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  76. android:layout_width="match_parent"
  77. android:layout_height="match_parent"
  78. android:orientation="vertical">
  79.  
  80. <TextView
  81. android:layout_width="match_parent"
  82. android:layout_height="wrap_content"
  83. android:background="@color/blue"
  84. android:text="Base TextView" />
  85.  
  86. <TextView
  87. android:layout_width="match_parent"
  88. android:layout_height="wrap_content"
  89. android:background="@color/red"
  90. android:text="Much Longer than top textView" />
  91.  
  92. </LinearLayout>
  93.  
  94. <TableLayout
  95. android:layout_width="wrap_content"
  96. android:layout_height="wrap_content"
  97. >
  98.  
  99. <TextView
  100. android:text="TextView20938487494590786907809568659"
  101. android:layout_width="wrap_content"
  102. android:layout_height="wrap_content"
  103. android:id="@+id/textView3"
  104. android:background="#80123456"
  105. />
  106.  
  107. <TextView
  108. android:text="TextView"
  109. android:layout_width="wrap_content"
  110. android:layout_height="wrap_content"
  111. android:id="@+id/textView2"
  112. android:background="#80723456"
  113. />
  114.  
  115. </TableLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement