mirror of
https://github.com/moparisthebest/android-app
synced 2024-11-15 05:15:04 -05:00
articleList: switch between Show All <-> Show Unread
This commit is contained in:
parent
f41a17de50
commit
4f2a4d1399
@ -59,6 +59,12 @@ public class ListArticles extends BaseActionBarActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
|
menu.findItem(R.id.menuShowAll).setTitle(getString(showAll ? R.string.menuShowUnread : R.string.menuShowAll));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
@ -83,7 +89,7 @@ public class ListArticles extends BaseActionBarActivity {
|
|||||||
} else {
|
} else {
|
||||||
setupListAdapter();
|
setupListAdapter();
|
||||||
}
|
}
|
||||||
setTitle("wallabag | " + readList.getCount() + " Articles");
|
setTitle(getString(R.string.app_name) + " | " + getResources().getQuantityString(R.plurals.numberOfArticles, readList.getCount(), readList.getCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupListAdapter() {
|
private void setupListAdapter() {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
<item android:id="@+id/menuShowAll" android:title="@string/menuShowAll"></item>
|
<item android:id="@+id/menuShowAll" android:title="@string/menuShowAll" />
|
||||||
<item android:id="@+id/menuWipeDb" android:title="@string/menuWipeDb"></item>
|
<item android:id="@+id/menuWipeDb" android:title="@string/menuWipeDb" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -21,4 +21,9 @@
|
|||||||
<string name="txtAPIToken"><b><u>Dein Token:</u></b></string>
|
<string name="txtAPIToken"><b><u>Dein Token:</u></b></string>
|
||||||
<string name="error">Fehler</string>
|
<string name="error">Fehler</string>
|
||||||
<string name="error_feed">Fehler beim laden des Feeds</string>
|
<string name="error_feed">Fehler beim laden des Feeds</string>
|
||||||
|
<string name="menuShowUnread">Ungelesene anzeigen</string>
|
||||||
|
<plurals name="numberOfArticles">
|
||||||
|
<item quantity="one">%d Artikel</item>
|
||||||
|
<item quantity="other">%d Artikel</item>
|
||||||
|
</plurals>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<string name="btnMarkRead">Mark as Read</string>
|
<string name="btnMarkRead">Mark as Read</string>
|
||||||
<string name="btnSettings">Settings</string>
|
<string name="btnSettings">Settings</string>
|
||||||
<string name="menuShowAll">Show All</string>
|
<string name="menuShowAll">Show All</string>
|
||||||
|
<string name="menuShowUnread">Show Unread</string>
|
||||||
<string name="menuWipeDb">Wipe Database</string>
|
<string name="menuWipeDb">Wipe Database</string>
|
||||||
<string name="txtSyncDone">Synchronize done !</string>
|
<string name="txtSyncDone">Synchronize done !</string>
|
||||||
<string name="txtNetOffline">Check Internet Connectivity !</string>
|
<string name="txtNetOffline">Check Internet Connectivity !</string>
|
||||||
@ -21,4 +22,8 @@
|
|||||||
<string name="txtAPIToken"><b><u>Your Token:</u></b></string>
|
<string name="txtAPIToken"><b><u>Your Token:</u></b></string>
|
||||||
<string name="error">Error</string>
|
<string name="error">Error</string>
|
||||||
<string name="error_feed">Error loading feed</string>
|
<string name="error_feed">Error loading feed</string>
|
||||||
|
<plurals name="numberOfArticles">
|
||||||
|
<item quantity="one">%d Article</item>
|
||||||
|
<item quantity="other">%d Articles</item>
|
||||||
|
</plurals>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user