Advertisement
4C3

Untitled

4C3
May 9th, 2019
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:app="http://schemas.android.com/apk/res-auto"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. tools:context=".MainActivity">
  7.  
  8. <Button
  9. android:id="@+id/button"
  10. android:layout_width="wrap_content"
  11. android:layout_height="wrap_content"
  12. android:layout_marginTop="24dp"
  13. android:layout_marginEnd="16dp"
  14. android:layout_marginRight="16dp"
  15. android:text="Button"
  16. app:layout_constraintEnd_toEndOf="parent"
  17. app:layout_constraintTop_toTopOf="parent" />
  18.  
  19. <EditText
  20. android:id="@+id/editText"
  21. android:layout_width="0dp"
  22. android:layout_height="wrap_content"
  23. android:layout_marginStart="16dp"
  24. android:layout_marginLeft="16dp"
  25. android:layout_marginTop="24dp"
  26. android:layout_marginEnd="16dp"
  27. android:layout_marginRight="16dp"
  28. android:ems="10"
  29. android:inputType="textPersonName"
  30. app:layout_constraintEnd_toStartOf="@+id/button"
  31. app:layout_constraintStart_toStartOf="parent"
  32. app:layout_constraintTop_toTopOf="parent" />
  33.  
  34. <ScrollView
  35. android:id="@+id/scrollView"
  36. android:layout_width="0dp"
  37. android:layout_height="0dp"
  38. android:layout_marginTop="8dp"
  39. android:layout_marginBottom="16dp"
  40. android:layout_marginStart="8dp"
  41. android:layout_marginEnd="8dp"
  42. android:fadeScrollbars="false"
  43. android:orientation="vertical"
  44. android:fillViewport="true"
  45. app:layout_constraintBottom_toBottomOf="parent"
  46. app:layout_constraintEnd_toEndOf="parent"
  47. app:layout_constraintHorizontal_bias="1.0"
  48. app:layout_constraintStart_toStartOf="parent"
  49. app:layout_constraintTop_toBottomOf="@+id/editText">
  50.  
  51. <LinearLayout
  52. android:orientation="vertical"
  53. android:layout_height="wrap_content"
  54. android:layout_width="match_parent">
  55. <LinearLayout
  56. android:layout_height="0dp"
  57. android:layout_width="match_parent"
  58. android:layout_weight="1">
  59. <!-- this expands to fill the empty space if needed -->
  60. </LinearLayout>
  61.  
  62. <!-- this sits at the bottom of the ScrollView,
  63. getting pushed out of view if the ScrollView's
  64. content is tall enough -->
  65. <TextView
  66. android:id="@+id/textView"
  67. android:layout_width="match_parent"
  68. android:layout_height="match_parent"
  69. android:background="@null"
  70. android:gravity="bottom" />
  71. </LinearLayout>
  72. </ScrollView>
  73.  
  74. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement