我的应用程序有操作栏,然后有2个按钮和EdidText,当输入长的多行文本时,上面的所有内容都会隐藏
我需要使操作栏和顶部的2个按钮始终可见。以防万一,如果多行文字不适合屏幕显示,我想使其可滚动。但正如我所说,按钮和操作栏必须始终可见。 这是问题的屏幕截图:https://drive.google.com/file/d/14p9MZOIUJUNBp7WGdlZNWSWpNP6NQgsa/view?usp=sharing
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
tools:context=".CreateQuestionActivity">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/constraintLayout"
android:layout_weight="0"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="8dp" tools:layout_editor_absoluteY="36dp">
<Button
android:text="Save question"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:id="@+id/saveQuestion"/>
<Button
android:text="Start quiz"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:id="@+id/startQuiz"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="8dp" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="8dp" app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="313dp"
android:inputType="textMultiLine"
android:hint="Question"
android:ems="10"
android:id="@+id/question"/>
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textMultiLine"
android:ems="10"
android:gravity="start"
android:hint="Answer"
android:id="@+id/answer"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
如何使两个按钮和操作栏始终可见?