0
我有一個像我的鍵盤彈出後隱藏的問題,有一個空的空間,其中的任何鍵盤。我在ScrollView
內部幾乎沒有任何組件。鍵盤隱藏葉空空白
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_horizontal_margin"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_state" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/district"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_district" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/police_station"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_station" />
</android.support.design.widget.TextInputLayout>
<include
android:id="@+id/vehicle_type"
layout="@layout/template_cascading_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<include
android:id="@+id/vehicle_manufacturer"
layout="@layout/template_cascading_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<include
android:id="@+id/vehicle_model"
layout="@layout/template_cascading_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<include
android:id="@+id/registration_no"
layout="@layout/template_registration_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/engine_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_station" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/chassis_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_station" />
</android.support.design.widget.TextInputLayout>
<include
android:id="@+id/capture_image"
layout="@layout/template_image_control"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp" />
</LinearLayout>
</ScrollView>
和ScreenShot它。
我沒有找到任何理由又爲什麼發生這種情況。任何幫助都會有所幫助。
注: 我用Google搜索,足以找到解決方案,加入windowBackground
在styles.xml
沒有幫助。我沒有找到有效的理由來使用它。
我也試過沒有添加TextInputLayout
。但結果是一樣的。
發生在Android的所有版本中。