package app.test;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class Test extends PreferenceActivity
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.main);
}
}
//xml/main.xml
android:key="using_categories_in_root_screen"
android:title="Categories"
android:summary="Using Preference Categories">
android:key="meats_screen"
android:title="Meats"
android:summary="Preferences related to Meats">
android:key="fish_selection_pref"
android:title="Fish"
android:summary="Fish is great for the healthy" />
android:key="chicken_selection_pref"
android:title="Chicken"
android:summary="A common type of poultry" />
android:key="lamb_selection_pref"
android:title="Lamb"
android:summary="Lamb is a young sheep" />
android:key="vegi_screen"
android:title="Vegetables"
android:summary="Preferences related to vegetable">
android:key="tomato_selection_pref"
android:title="Tomato"
android:summary="It's actually a fruit" />
android:key="potato_selection_pref"
android:title="Potato"
android:summary="My favorite vegetable" />