【发布时间】:2021-04-08 07:46:45
【问题描述】:
我有一个线性布局,在它的底部我有一个 EditText。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/text_view_id"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/hello" />
<TextView
android:id="@+id/title"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/hello" />
<TextView
android:id="@+id/description"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/hello" />
</LinearLayout>
<EditText
android:id="@+id/plain_text_input"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:inputType="text"/>
</LinearLayout>
问题是,当我运行应用程序并单击编辑文本时,键盘会弹出并修剪我正在输入的任何内容,因此一旦我退出编辑文本,键入的文本在键入过程中不可见,任何人都有关于如何确保在我们输入数据时edittext视图可见并且不会被键盘修剪的建议?
【问题讨论】:
标签: android android-layout android-fragments textview android-edittext