root / src / com / rackspacecloud / android / Preferences.java @ 2aaecc36
History | View | Annotate | Download (1.2 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 values of the preferences for the type of results to show (us/uk).
|
15 |
// Identical to the values specified in res/values/strings.xml.
|
16 |
public static final int COUNTRY_US = 0; |
17 |
public static final int COUNTRY_UK = 1; |
18 |
|
19 |
//Define auth server here
|
20 |
public static final String COUNTRY_US_AUTH_SERVER = "https://auth.api.rackspacecloud.com/v1.0"; |
21 |
public static final String COUNTRY_UK_AUTH_SERVER = "https://lon.auth.api.rackspacecloud.com/v1.0"; |
22 |
|
23 |
protected void onCreate(Bundle savedInstanceState) { |
24 |
super.onCreate(savedInstanceState);
|
25 |
getPreferenceManager().setSharedPreferencesName(SHARED_PREFERENCES_NAME); |
26 |
addPreferencesFromResource(R.xml.preferences); |
27 |
} |
28 |
} |