diff options
author | Andrew Dolgov <[email protected]> | 2014-11-04 13:43:51 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-04 13:43:51 +0300 |
commit | fcbf300432dc4ae309473a48b36d3dac56f8a1e3 (patch) | |
tree | d818f36bfec8bc272e652c8a0328e6723496230d /org.fox.ttrss/src/main | |
parent | a1ad7e0c41cf9665bfd1711bfbbe539849a35d2e (diff) |
add menu item to toggle oldest first (refs #822)
demote select articles actionbar button into overflow
Diffstat (limited to 'org.fox.ttrss/src/main')
6 files changed, 33 insertions, 5 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 0d87c783..803c40da 100644 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="265" - android:versionName="1.60" > + android:versionCode="266" + android:versionName="1.61" > <uses-sdk android:minSdkVersion="9" diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java index ea55b5cd..a6a3069a 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java @@ -296,7 +296,13 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe case android.R.id.home: //getSupportFragmentManager().popBackStack(); return true; - case R.id.show_feeds: + case R.id.headlines_toggle_sort_order: + SharedPreferences.Editor editor = m_prefs.edit(); + editor.putBoolean("oldest_first", !m_prefs.getBoolean("oldest_first", false)); + editor.commit(); + refresh(); + return true; + case R.id.show_feeds: setUnreadOnly(!getUnreadOnly()); initMenu(); refresh(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index 2714270e..d5cc0cde 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -2,6 +2,7 @@ package org.fox.ttrss.offline; import android.annotation.SuppressLint; import android.content.Intent; +import android.content.SharedPreferences; import android.database.sqlite.SQLiteStatement; import android.os.Bundle; import android.os.Handler; @@ -131,6 +132,12 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead case android.R.id.home: //getSupportFragmentManager().popBackStack(); return true; + case R.id.headlines_toggle_sort_order: + SharedPreferences.Editor editor = m_prefs.edit(); + editor.putBoolean("offline_oldest_first", !m_prefs.getBoolean("offline_oldest_first", false)); + editor.commit(); + refresh(); + return true; case R.id.show_feeds: setUnreadOnly(!getUnreadOnly()); initMenu(); diff --git a/org.fox.ttrss/src/main/res/menu/main_menu.xml b/org.fox.ttrss/src/main/res/menu/main_menu.xml index 673435b8..2bb72bc9 100644 --- a/org.fox.ttrss/src/main/res/menu/main_menu.xml +++ b/org.fox.ttrss/src/main/res/menu/main_menu.xml @@ -55,11 +55,17 @@ android:title="@string/headlines_mark_as_read"/> <item android:id="@+id/headlines_select" - app:showAsAction="ifRoom" + app:showAsAction="" android:icon="@drawable/ic_select_all_light" android:title="@string/headlines_select"/> <item + android:id="@+id/headlines_toggle_sort_order" + android:icon="@drawable/ic_action_sort_by_size" + app:showAsAction="ifRoom" + android:title="@string/toggle_sort_order"/> + + <item android:id="@+id/headlines_view_mode" app:showAsAction="" android:title="@string/headlines_view_mode"/> diff --git a/org.fox.ttrss/src/main/res/menu/offline_menu.xml b/org.fox.ttrss/src/main/res/menu/offline_menu.xml index cebeaf09..a4731bd9 100644 --- a/org.fox.ttrss/src/main/res/menu/offline_menu.xml +++ b/org.fox.ttrss/src/main/res/menu/offline_menu.xml @@ -16,6 +16,7 @@ <group android:id="@+id/menu_group_headlines" > <item android:id="@+id/search" + app:showAsAction="ifRoom" android:icon="@drawable/ic_search_light" android:title="@string/search"/> <item @@ -26,8 +27,15 @@ <item android:id="@+id/headlines_select" android:icon="@drawable/ic_select_all_light" - app:showAsAction="ifRoom" + app:showAsAction="" android:title="@string/headlines_select"/> + + <item + android:id="@+id/toggle_sort_order" + android:icon="@drawable/ic_action_sort_by_size" + app:showAsAction="ifRoom" + android:title="@string/toggle_sort_order"/> + <item android:id="@+id/headlines_view_mode" app:showAsAction="" diff --git a/org.fox.ttrss/src/main/res/values/strings.xml b/org.fox.ttrss/src/main/res/values/strings.xml index ac522c50..b4f81543 100644 --- a/org.fox.ttrss/src/main/res/values/strings.xml +++ b/org.fox.ttrss/src/main/res/values/strings.xml @@ -243,5 +243,6 @@ <string name="action_settings">Settings</string> <string name="error_loading_image">Error loading image.</string> <string name="open_parent">Open parent</string> + <string name="toggle_sort_order">Toggle oldest first</string> </resources> |