Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".MainActivity">
- <Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
- android:layout_marginEnd="16dp"
- android:layout_marginRight="16dp"
- android:text="Button"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- <EditText
- android:id="@+id/editText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginLeft="16dp"
- android:layout_marginTop="24dp"
- android:layout_marginEnd="16dp"
- android:layout_marginRight="16dp"
- android:ems="10"
- android:inputType="textPersonName"
- app:layout_constraintEnd_toStartOf="@+id/button"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- <ScrollView
- android:id="@+id/scrollView"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginTop="8dp"
- android:layout_marginBottom="16dp"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="8dp"
- android:fadeScrollbars="false"
- android:orientation="vertical"
- android:fillViewport="true"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="1.0"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/editText">
- <LinearLayout
- android:orientation="vertical"
- android:layout_height="wrap_content"
- android:layout_width="match_parent">
- <LinearLayout
- android:layout_height="0dp"
- android:layout_width="match_parent"
- android:layout_weight="1">
- <!-- this expands to fill the empty space if needed -->
- </LinearLayout>
- <!-- this sits at the bottom of the ScrollView,
- getting pushed out of view if the ScrollView's
- content is tall enough -->
- <TextView
- android:id="@+id/textView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- android:gravity="bottom" />
- </LinearLayout>
- </ScrollView>
- </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement