Set subscription order and counter in the preferences
This commit is contained in:
parent
5178de8681
commit
5643933a51
|
@ -9,10 +9,29 @@
|
|||
android:key="prefTheme"
|
||||
android:summary="@string/pref_set_theme_sum"
|
||||
android:defaultValue="0"/>
|
||||
<Preference
|
||||
android:key="prefHiddenDrawerItems"
|
||||
android:summary="@string/pref_nav_drawer_items_sum"
|
||||
android:title="@string/pref_nav_drawer_items_title" />
|
||||
<PreferenceScreen
|
||||
android:key="prefDrawerSettings"
|
||||
android:summary="@string/pref_nav_drawer_sum"
|
||||
android:title="@string/pref_nav_drawer_title">
|
||||
<Preference
|
||||
android:key="prefHiddenDrawerItems"
|
||||
android:summary="@string/pref_nav_drawer_items_sum"
|
||||
android:title="@string/pref_nav_drawer_items_title" />
|
||||
<ListPreference
|
||||
android:entryValues="@array/nav_drawer_feed_order_values"
|
||||
android:entries="@array/nav_drawer_feed_order_options"
|
||||
android:title="@string/pref_nav_drawer_feed_order_title"
|
||||
android:key="prefDrawerFeedOrder"
|
||||
android:summary="@string/pref_nav_drawer_feed_order_sum"
|
||||
android:defaultValue="0"/>
|
||||
<ListPreference
|
||||
android:entryValues="@array/nav_drawer_feed_indicator_values"
|
||||
android:entries="@array/nav_drawer_feed_indicator_options"
|
||||
android:title="@string/pref_nav_drawer_feed_indicator_title"
|
||||
android:key="prefDrawerFeedIndicator"
|
||||
android:summary="@string/pref_nav_drawer_feed_indicator_sum"
|
||||
android:defaultValue="0"/>
|
||||
</PreferenceScreen>
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:enabled="true"
|
||||
|
|
|
@ -43,6 +43,8 @@ public class UserPreferences {
|
|||
// User Interface
|
||||
public static final String PREF_THEME = "prefTheme";
|
||||
public static final String PREF_HIDDEN_DRAWER_ITEMS = "prefHiddenDrawerItems";
|
||||
public static final String PREF_DRAWER_FEED_ORDER = "prefDrawerFeedOrder";
|
||||
public static final String PREF_DRAWER_FEED_INDICATOR = "prefDrawerFeedIndicator";
|
||||
public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
|
||||
public static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
|
||||
public static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport";
|
||||
|
@ -85,6 +87,12 @@ public class UserPreferences {
|
|||
|
||||
// Constants
|
||||
private static int EPISODE_CACHE_SIZE_UNLIMITED = -1;
|
||||
public static int ORDER_UNPLAYED_EPISODES = 0;
|
||||
public static int ORDER_ALPHABETICAL = 1;
|
||||
public static int SHOW_NEW_UNPLAYED_SUM = 0;
|
||||
public static int SHOW_NEW = 1;
|
||||
public static int SHOW_UNPLAYED = 2;
|
||||
public static int SHOW_NONE= 3;
|
||||
|
||||
private static Context context;
|
||||
private static SharedPreferences prefs;
|
||||
|
@ -128,6 +136,16 @@ public class UserPreferences {
|
|||
return new ArrayList<String>(Arrays.asList(StringUtils.split(hiddenItems, ',')));
|
||||
}
|
||||
|
||||
public static int getFeedOrder() {
|
||||
String value = prefs.getString(PREF_DRAWER_FEED_ORDER, "0");
|
||||
return Integer.valueOf(value);
|
||||
}
|
||||
|
||||
public static int getFeedIndicator() {
|
||||
String value = prefs.getString(PREF_DRAWER_FEED_INDICATOR, "0");
|
||||
return Integer.valueOf(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns notification priority.
|
||||
*
|
||||
|
|
|
@ -126,6 +126,28 @@
|
|||
<item>@string/add_feed_label</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="nav_drawer_feed_order_options">
|
||||
<item>@string/drawer_feed_order_unplayed_episodes</item>
|
||||
<item>@string/drawer_feed_order_alphabetical</item>
|
||||
</string-array>
|
||||
<string-array name="nav_drawer_feed_order_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="nav_drawer_feed_indicator_options">
|
||||
<item>@string/drawer_feed_indicator_new_unplayed</item>
|
||||
<item>@string/drawer_feed_indicator_new</item>
|
||||
<item>@string/drawer_feed_indicator_unplayed</item>
|
||||
<item>@string/drawer_feed_indicator_none</item>
|
||||
</string-array>
|
||||
<string-array name="nav_drawer_feed_indicator_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="episode_hide_options">
|
||||
<item>@string/hide_unplayed_episodes_label</item>
|
||||
<item>@string/hide_paused_episodes_label</item>
|
||||
|
|
|
@ -33,6 +33,12 @@
|
|||
<string name="drawer_open">Open menu</string>
|
||||
<string name="drawer_close">Close menu</string>
|
||||
<string name="drawer_preferences">Drawer Preferences</string>
|
||||
<string name="drawer_feed_order_unplayed_episodes">Sort by counter</string>
|
||||
<string name="drawer_feed_order_alphabetical">Sort alphabetically</string>
|
||||
<string name="drawer_feed_indicator_new_unplayed">Number of new and unplayed episodes</string>
|
||||
<string name="drawer_feed_indicator_new">Number of new episodes</string>
|
||||
<string name="drawer_feed_indicator_unplayed">Number of unplayed episodes</string>
|
||||
<string name="drawer_feed_indicator_none">None</string>
|
||||
|
||||
<!-- Webview actions -->
|
||||
<string name="open_in_browser_label">Open in Browser</string>
|
||||
|
@ -84,6 +90,7 @@
|
|||
<string name="mark_all_read_msg">Marked all Episodes as played</string>
|
||||
<string name="mark_all_read_confirmation_msg">Please confirm that you want to mark all episodes as being played.</string>
|
||||
<string name="mark_all_read_feed_confirmation_msg">Please confirm that you want to mark all episodes in this feed as being played.</string>
|
||||
<string name="mark_all_seen_label">Mark all as seen</string>
|
||||
<string name="show_info_label">Show information</string>
|
||||
<string name="remove_feed_label">Remove Podcast</string>
|
||||
<string name="share_label">Share...</string>
|
||||
|
@ -279,8 +286,14 @@
|
|||
<string name="pref_auto_flattr_sum">Configure automatic flattring</string>
|
||||
<string name="user_interface_label">User Interface</string>
|
||||
<string name="pref_set_theme_title">Select Theme</string>
|
||||
<string name="pref_nav_drawer_items_title">Change Navigation Drawer</string>
|
||||
<string name="pref_nav_drawer_title">Customize Navigation Drawer</string>
|
||||
<string name="pref_nav_drawer_sum">Customize the appearance of the navigation drawer.</string>
|
||||
<string name="pref_nav_drawer_items_title">Set Navigation Drawer items</string>
|
||||
<string name="pref_nav_drawer_items_sum">Change which items appear in the navigation drawer.</string>
|
||||
<string name="pref_nav_drawer_feed_order_title">Set Subscription Order</string>
|
||||
<string name="pref_nav_drawer_feed_order_sum">Change the order of your subscriptions</string>
|
||||
<string name="pref_nav_drawer_feed_indicator_title">Set Subscription Counter</string>
|
||||
<string name="pref_nav_drawer_feed_indicator_sum">Change the information displayed by the subscription counter</string>
|
||||
<string name="pref_set_theme_sum">Change the appearance of AntennaPod.</string>
|
||||
<string name="pref_automatic_download_title">Automatic Download</string>
|
||||
<string name="pref_automatic_download_sum">Configure the automatic download of episodes.</string>
|
||||
|
|
Loading…
Reference in New Issue