実行時にフラグメントをロードするアクティビティがあります。アプリケーションを起動すると、アクティビティは EditText を含むフラグメントをロードします。私は ActionBarSherlock を splitActionBarWhenNarrow と共に使用しているので、分割バー (画面の下部にアクション バー) があります。EditText がフォーカスを取得し、ソフト キーボードが読み込まれると、分割バーの上に移動して非表示になります。アクション バーでも NAVIGATION_MODE_LIST を使用し、ドロップダウン メニューを使用して別のフラグメントを読み込みます。他のフラグメントをロードすると、他のフラグメントに移動しても、下部のアクション バーがソフト キーボードの上に正しく表示され、正しく動作し続けます。スクリーンショットをいくつか追加して、それを明確にします。
最初のフラグメント ローダー、分割バーがソフト キーボードで表示されない
アクションバー ナビゲーションを使用して 2 番目のフラグメントをロードした後
別のフラグメントをリロードしていますが、アクション バーはまだ表示されています
フラグメントをロードするためだけに最小限のコードでテストプロジェクトを試してみましたが、動作は同じで、分割バーはソフトキーボードによって隠されています。最初から分割バーを表示するにはどうすればよいですか?
編集: android:windowSoftInputMode="adjustResize" は、この動作で何も変更しません
アクティビティのレイアウト:
<it.bem.remailr.MyFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container"
android:orientation="horizontal"
android:background="@drawable/bg_no_repeat"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
フラグメントのレイアウト:
<it.bem.remailr.MyRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top|left"
android:inputType="textMultiLine|textNoSuggestions"
android:windowSoftInputMode="adjustPan"
android:background="#00000000"
android:hint="@string/text_hint"
android:scrollHorizontally="false" >
</EditText>
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />