narimetisaigopi

linear_layout example

Jan 14th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 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. android:orientation="horizontal"
  8. android:weightSum="3"
  9. tools:context=".MainActivity">
  10.  
  11.  
  12. <TextView
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:text="Hello A"
  16. android:textSize="20sp"
  17. android:layout_weight="1"
  18. android:background="@color/colorPrimary"/>
  19.  
  20. <TextView
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. android:text="Hello B"
  24. android:layout_weight="1"
  25. android:textSize="20sp"
  26. android:background="@color/colorAccent"/>
  27.  
  28. <TextView
  29. android:layout_width="match_parent"
  30. android:layout_height="wrap_content"
  31. android:text="Hello C"
  32. android:layout_weight="1"
  33. android:textSize="20sp"
  34. android:background="#fadada"/>
  35.  
  36.  
  37. </LinearLayout>
Add Comment
Please, Sign In to add comment