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
xmlns:android="http://schemas.android.com/apk/res/android"
android:key="flight_columns_pref"
android:title="Flight Search Preferences"
android:summary="Set Columns for Search Results">
android:key="show_airline_column_pref"
android:title="Airline"
android:summary="Show Airline column" />
android:key="show_departure_column_pref"
android:title="Departure"
android:summary="Show Departure column" />
android:key="show_arrival_column_pref"
android:title="Arrival"
android:summary="Show Arrival column" />
android:key="show_total_travel_time_column_pref"
android:title="Total Travel Time"
android:summary="Show Total Travel Time column" />
android:key="show_price_column_pref"
android:title="Price"
android:summary="Show Price column" />