Improved Feedmenu

This commit is contained in:
daniel oeh 2012-06-23 15:57:00 +02:00
parent 5c308c7f1e
commit 3608ba18b6
4 changed files with 15 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,6 +1,8 @@
<?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/remove_item" android:title="@string/remove_label" android:icon="@drawable/content_discard" android:visible="true"></item> <item android:id="@+id/mark_all_read_item" android:title="@string/mark_all_read_label" android:showAsAction="ifRoom|withText"></item><item android:id="@+id/show_info_item" android:icon="@drawable/action_about" android:title="@string/show_info_label" android:showAsAction="always"></item><item android:id="@+id/remove_item" android:title="@string/remove_feed_label" android:icon="@drawable/content_discard" android:visible="true" android:showAsAction="collapseActionView"></item>
</menu> </menu>

View File

@ -55,4 +55,7 @@
<string name="stream_label">Stream</string> <string name="stream_label">Stream</string>
<string name="player_seeking_msg">Seeking</string> <string name="player_seeking_msg">Seeking</string>
<string name="player_playing_msg"></string> <string name="player_playing_msg"></string>
<string name="mark_all_read_label">Mark all read</string>
<string name="show_info_label">Show information</string>
<string name="remove_feed_label">Remove Feed</string>
</resources> </resources>

View File

@ -111,6 +111,9 @@ public class FeedlistFragment extends SherlockListFragment {
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
pActivity.unregisterReceiver(contentUpdate); pActivity.unregisterReceiver(contentUpdate);
if (mActionMode != null) {
mActionMode.finish();
}
} }
private BroadcastReceiver contentUpdate = new BroadcastReceiver() { private BroadcastReceiver contentUpdate = new BroadcastReceiver() {
@ -158,6 +161,12 @@ public class FeedlistFragment extends SherlockListFragment {
}; };
remover.execute(selectedFeed); remover.execute(selectedFeed);
break; break;
case R.id.mark_all_read_item:
for (FeedItem feeditem : selectedFeed.getItems()) {
manager.markItemRead(getSherlockActivity(), feeditem, true);
}
fla.notifyDataSetChanged();
break;
} }
mode.finish(); mode.finish();
return true; return true;