Statistics
| Branch: | Revision:

root / src / com / rackspacecloud / android / Preferences.java @ 008df6cf

History | View | Annotate | Download (1.3 kB)

1
package com.rackspacecloud.android;
2

    
3
import android.os.Bundle;
4
import android.preference.PreferenceActivity;
5

    
6
public class Preferences extends PreferenceActivity{
7
    // The name of the SharedPreferences file we'll store preferences in.
8
    public static final String SHARED_PREFERENCES_NAME = "Preferences";
9
        
10
        // The key to the preference for the type of results to show (us/uk).
11
    // Identical to the value specified in res/values/strings.xml.
12
    public static final String PREF_KEY_RESULTS_TYPE = "countries_type";
13

    
14
    // The key to the Auth Server preference.
15
    public static final String PREF_KEY_AUTH_SERVER = "authServerPref";
16

    
17
    // The values of the preferences for the type of results to show (us/uk).
18
    // Identical to the values specified in res/values/strings.xml.
19
    public static final int COUNTRY_US = 0;
20
    public static final int COUNTRY_UK = 1;
21
    
22
    //Define auth server here
23
    public static final String COUNTRY_US_AUTH_SERVER = "https://auth.api.rackspacecloud.com/v1.0";
24
    public static final String COUNTRY_UK_AUTH_SERVER = "https://lon.auth.api.rackspacecloud.com/v1.0";
25

    
26
    
27
        protected void onCreate(Bundle savedInstanceState) {
28
                super.onCreate(savedInstanceState);
29
        getPreferenceManager().setSharedPreferencesName(SHARED_PREFERENCES_NAME);
30
                addPreferencesFromResource(R.layout.preferences);
31
        }
32
}