Added strings for preferences

This commit is contained in:
daniel oeh 2012-07-07 23:37:52 +02:00
parent 409c7810a1
commit 5c9a2d260d
2 changed files with 44 additions and 21 deletions

View File

@ -1,17 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="@string/playback_pref">
<CheckBoxPreference android:key="prefPauseOnHeadsetDisconnect" android:title="@string/pref_pauseOnHeadsetDisconnect_title" android:enabled="true" android:defaultValue="true" android:summary="@string/pref_pauseOnHeadsetDisconnect_sum"/>
<CheckBoxPreference android:key="prefFollowQueue" android:title="@string/pref_followQueue_title" android:enabled="true" android:defaultValue="false" android:summary="@string/pref_followQueue_sum"/>
</PreferenceCategory><PreferenceCategory android:title="@string/network_pref">
<CheckBoxPreference android:key="prefDownloadMediaOnWifiOnly" android:title="@string/pref_downloadMediaOnWifiOnly_title" android:enabled="true" android:defaultValue="true" android:summary="@string/pref_downloadMediaOnWifiOnly_sum"/><ListPreference android:title="@string/pref_autoUpdateIntervall_title" android:summary="@string/pref_autoUpdateIntervall_sum" android:key="prefAutoUpdateIntervall" android:entryValues="@array/update_intervall_values" android:entries="@array/update_intervall_options" android:defaultValue="0"/>
</PreferenceCategory><PreferenceCategory android:title="@string/other_pref">
<Preference android:title="@string/version_pref"/>
<Preference android:title="@string/about_pref"/>
<PreferenceCategory android:title="@string/playback_pref" >
<CheckBoxPreference
android:defaultValue="true"
android:enabled="true"
android:key="prefPauseOnHeadsetDisconnect"
android:summary="@string/pref_pauseOnHeadsetDisconnect_sum"
android:title="@string/pref_pauseOnHeadsetDisconnect_title" />
<CheckBoxPreference
android:defaultValue="false"
android:enabled="true"
android:key="prefFollowQueue"
android:summary="@string/pref_followQueue_sum"
android:title="@string/pref_followQueue_title" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/network_pref" >
<CheckBoxPreference
android:defaultValue="true"
android:enabled="true"
android:key="prefDownloadMediaOnWifiOnly"
android:summary="@string/pref_downloadMediaOnWifiOnly_sum"
android:title="@string/pref_downloadMediaOnWifiOnly_title" />
<ListPreference
android:defaultValue="0"
android:entries="@array/update_intervall_options"
android:entryValues="@array/update_intervall_values"
android:key="prefAutoUpdateIntervall"
android:summary="@string/pref_autoUpdateIntervall_sum"
android:title="@string/pref_autoUpdateIntervall_title" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/other_pref" >
<Preference android:title="@string/version_pref" />
<Preference android:title="@string/about_pref" />
</PreferenceCategory>
</PreferenceScreen>

View File

@ -6,12 +6,16 @@ import de.podfetcher.asynctask.FeedImageLoader;
import de.podfetcher.feed.FeedManager;
public class PodcastApp extends Application {
private static final String TAG = "PodcastApp";
public static final String PREF_NAME = "PodfetcherPrefs";
private static PodcastApp singleton;
private static final String TAG = "PodcastApp";
public static final String PREF_NAME = "PodfetcherPrefs";
public static final String PREF_PAUSE_ON_HEADSET_DISCONNECT = "prefPauseOnHeadsetDisconnect";
public static final String PREF_FOLLOW_QUEUE = "prefFollowQueue";
public static final String PREF_DOWNLOAD_MEDIA_ON_WIFI_ONLY = "prefDownloadMediaOnWifiOnly";
public static final String PREF_UPDATE_INTERVALL = "prefAutoUpdateIntervall";
private static PodcastApp singleton;
public static PodcastApp getInstance() {
return singleton;
}
@ -20,7 +24,7 @@ public class PodcastApp extends Application {
public void onCreate() {
super.onCreate();
singleton = this;
FeedManager manager = FeedManager.getInstance();
manager.loadDBData(getApplicationContext());
}
@ -31,8 +35,5 @@ public class PodcastApp extends Application {
Log.w(TAG, "Received onLowOnMemory warning. Cleaning image cache...");
FeedImageLoader.getInstance().wipeImageCache();
}
}