0
ソフト入力を開いたときに赤い領域に相対レイアウトを表示するにはどうすればよいですか?私はadjustPanとadjustResize入力モードを試みたが、起こらなかった。何か案は?android-windowSoftInputMode issue
ソフト入力を開いたときに赤い領域に相対レイアウトを表示するにはどうすればよいですか?私はadjustPanとadjustResize入力モードを試みたが、起こらなかった。何か案は?android-windowSoftInputMode issue
まず、manifest.xmlにであなたの活動にandroid:windowSoftInputMode="adjustResize"
を追加します。
次に、以下のようなレイアウトを作成します。
RelativeLayout
は2人の子供(ScrollViewおよび底面図)aligned to bottom
の内側に入れてください。above
にあります。<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_above="@+id/bottomView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
//scrollable content
</ScrollView>
<RelativeLayout
android:id="@+id/bottomView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
//your bottom content
</RelativeLayout >
</RelativeLayout>
ありがとう!それは働いた –