title: Preferenceactivity on 10 Inch device in landscape mode
body: <p>I'm having trouble getting Preferences displayed correctly on 10 Inch devices in lanscape orientation.
  It is displaying category headers and checkboxes really strange. See attached image to get the idea.
  <img src="https://i.stack.imgur.com/4SJiV.png" alt="PreferenceScreen"></p>
  
  <p>Prefs-XML (Only category, cause fields are added in code later):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;PreferenceCategory
      android:key="settingsCategory"
      android:title="@string/mobile_global_settings" &gt;
  &lt;/PreferenceCategory&gt;
  </code></pre>
  
  <p></p>
  
  <p>In the SettingsActivity i add the PreferenceFragment like this:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      setTheme(R.style.Theme_Tp_actionbar_style);
      super.onCreate(savedInstanceState);
      getFragmentManager().beginTransaction().replace(android.R.id.content, new MyPreferenceFragment()).commit();
  }
  </code></pre>
  
  <p>My PreferenceFragment looks like this (i have to use different settings_keys for different users logged into the app):</p>
  
  <pre><code>public static class MyPreferenceFragment extends PreferenceFragment
  {
      @Override
      public void onCreate(final Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          addPreferencesFromResource(R.xml.settings);
  
          TPSettingsActivity act = (TPSettingsActivity)getActivity();
          String userName = "xxx";
  
          SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
  
          PreferenceCategory targetCategory = (PreferenceCategory)findPreference("settingsCategory");
  
          CheckBoxPreference checkBoxPreference = new CheckBoxPreference(getActivity());
          checkBoxPreference.setKey(userName + "_autoclear");
          checkBoxPreference.setChecked(true);
          checkBoxPreference.setSummary(R.string.mobile_settings_onoff);
          checkBoxPreference.setTitle(R.string.mobile_settings_autoclean);
          checkBoxPreference.setChecked(prefs.getBoolean(userName + "_autoclear", false));
          targetCategory.addPreference(checkBoxPreference);
  
          TPListPreference listPref = new TPListPreference(getActivity());
          listPref.setKey(userName + "_autoclearperiod");
          listPref.setEntries(R.array.autoclearOptions);
          listPref.setEntryValues(R.array.autoclearValues);
          listPref.setSummary(R.string.mobile_settings_currentinterval);
          listPref.setTitle(R.string.mobile_settings_interval);
          listPref.setValue(prefs.getString(userName + "_autoclearperiod", "7"));
          targetCategory.addPreference(listPref);
      }
  }
  </code></pre>
  
  <p>This also happens when using not the App specific Theme. The Theme i am using was generator using the ThemeGenerator listed on Android Asset Studio Site:
  <a href="http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html" rel="nofollow noreferrer">Android Asset Studio</a></p>