レイアウトの背景全体を覆うグラデーションがあります。ただし、ソフトウェア キーボードを閉じると、グラデーションが最大の高さにサイズ変更されるまでに約 1 秒かかります。これにより、下の図に示す白い背景が生成されます。
私は何かをすることを考えました
android:windowSoftInputMode="adjustPan"
ただし、リスト ビューの大部分がキーボードの下に隠れてしまうため、これは悪い習慣です。勾配:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:useLevel="false" >
<gradient
android:startColor="#0d2d70"
android:endColor="#007dbc"
android:useLevel="false"
android:type="linear"
android:angle="45" />
</shape>
レイアウト:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/gradient"
android:padding="20dp" >
<!-- input field is here -->
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/input_licence"
android:divider="#FFFFFF"
android:dividerHeight="1dp"
android:padding="5dp"
android:scrollbarStyle="outsideOverlay" >
</ListView>
</RelativeLayout>
空白を防ぐ方法はありますか?