I want to add a couple buttons to the bottom of my preferences screen for setting defaults and restoring defaults. This answer doesn\'t cover how to do this using PreferenceFrag
Just create your own layout for the settings activity which contains list view with id @android:id/list
And then in the activity class set the content view before adding preference fragment
public class SettingsActivity extends Activity {
@Override
public void onCreate( Bundle savedInstanceState) {
super.onCreate( savedInstanceState);
setContentView(R.layout.settings_activity)
// load up the preferences fragment
getFragmentManager().beginTransaction().replace( android.R.id.content, new PrefsSettingsFragment()).commit();
}
}