その場合はタブレット端末と認識されて、勝手に余白ができてしまうようだ。
で、GlaxyS3での見栄えが良くないので、android4.0以前のものと同じにしてくれと言われた。
タブレットで見にくくなるのは良いのだろうか・・・
ともかくそういうことなので、どうにかすることにした。
単純にidに@android:id/listを持つListViewだけをもつlayoutを作成し、読み込ませる。
解決。
PreferenceActivity
import android.preference.PreferenceActivity; public class SettingActivity extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.preference_layout); addPreferencesFromResource(R.xml.preference); } }
preference.xml
<?xml version="1.0" encoding="utf-8"?> <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" > </ListView>