Search code examples
androidpreferenceactivity

Android preferences theme


Does anyone know how I can set the the margins so the PreferencesActivity appears centered?

This is the result I'm getting.

Desired theme I'm trying to achieve.

Any ideas?


Solution

  • I got it working by using PreferenceActivity.

        public class SettingsActivity extends PreferenceActivity {
          protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            addPreferencesFromResource(R.xml.preferences);
          }
        }
    

    img