これは私のレイアウトに簡単です:とsoftkeyboard他のビューの上に
android:windowSoftInputMode="stateHidden|adjustResize"
を私はのEditTextとsoftkeyboardをタッチすると:私はその活性のために、このプロパティを設定している
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="ir11.co.tsco.fll.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bear"
android:text="Hello World!" />
<EditText
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="50dp"
android:hint="Comment ..."
/>
</RelativeLayout>
マニフェストに表示され、imageViewのサイズが変更されました!またはアクティビティに次のプロパティを設定した場合:
android:windowSoftInputMode="stateHidden|adjustPan"
ソフトキーボードが画像をプッシュします。
これは私が望むものではありません。 edittext + softkeyboardをImageViewを押し上げたりサイズを変更したりせずにやりたい
どうすればよいですか?
スクロールビュー内に相対配置を配置します – silverFoxA