Back to project page SimpleWeather.
The source code is released under:
Apache License
If you think the Android project SimpleWeather listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.eventbooking.simpleweather; //from w ww. ja va 2s. c o m import android.app.Activity; import android.content.SharedPreferences; public class CityPreference { SharedPreferences preferences; public CityPreference(Activity activity) { preferences = activity.getPreferences(Activity.MODE_PRIVATE); } String getCity() { return preferences.getString("city", "Knoxville, TN"); } void setCity(String city) { preferences.edit().putString("city", city).commit(); } }