フラグメント スタイルで実装された単一ページの設定を持つ単純なアプリがあります。Android 4.x (いくつかのバージョン) を搭載したタブレットで実行しています。設定ページを開くと、アクション バーが一番上の設定項目を隠してしまいます。私の回避策は、ダミーの最初のアイテムを用意することですが、もちろんこれはばかげています。アクションバーを保持し、設定をアクションバーの下から開始する方法がわかりません。アクションバー用にプログラミングしているのではなく、表示されるだけです。
Preferences.xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<CheckBoxPreference
android:key="pref_AdaptToRoomXXX"
android:title="This is the dummy item as a spacer" />
<CheckBoxPreference
android:key ="@string/pref_TimeFormat"
android:title ="@string/action_setTimeFormat"
android:summary ="@string/action_setTimeFormat"
/>
<ListPreference
android:key="@string/pref_DateFormat"
android:title="@string/action_setDateFormat"
android:summary="@string/action_setDateFormat"
android:dialogTitle="@string/action_setDateFormat"
android:entries="@array/action_setDateFormat_options"
android:entryValues="@array/action_setDateFormat_values"
android:defaultValue="@string/action_setDateFormat_default" />
<ListPreference
android:key="@string/pref_TextColor"
android:title="@string/action_setTextColor"
android:summary="@string/action_setTextColor"
android:dialogTitle="@string/action_setTextColor"
android:entries="@array/action_setTextColor_colors"
android:entryValues="@array/action_setTextColor_values"
android:defaultValue="@string/action_setTextColor_default" />
<CheckBoxPreference
android:key="@string/pref_DimOnBattery"
android:title="@string/action_setDimOnBattery"
android:defaultValue="true" />
</PreferenceScreen>
助言がありますか?