add select none to headlines selection menu
This commit is contained in:
parent
95f6ef2fa2
commit
f44bd5e47d
@ -61,6 +61,12 @@
|
||||
android:icon="@drawable/ic_menu_rss"
|
||||
android:showAsAction=""
|
||||
android:title="@string/selection_toggle_published"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/selection_select_none"
|
||||
android:icon="@android:drawable/ic_menu_close_clear_cancel"
|
||||
android:showAsAction=""
|
||||
android:title="@string/selection_select_none"/>
|
||||
</group>
|
||||
|
||||
<group android:id="@+id/menu_group_article" >
|
||||
|
@ -54,6 +54,7 @@
|
||||
<string name="selection_toggle_marked">(Un)Star</string>
|
||||
<string name="selection_toggle_published">(Un)Publish</string>
|
||||
<string name="selection_toggle_unread">(Un)Read</string>
|
||||
<string name="selection_select_none">Deselect all</string>
|
||||
<string name="context_selection_toggle_marked">(Un)Star</string>
|
||||
<string name="context_selection_toggle_published">(Un)Publish</string>
|
||||
<string name="context_selection_toggle_unread">(Un)Read</string>
|
||||
|
@ -619,6 +619,15 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
updateHeadlines();
|
||||
}
|
||||
return true;
|
||||
case R.id.selection_select_none:
|
||||
if (hf != null) {
|
||||
ArticleList selected = hf.getSelectedArticles();
|
||||
if (selected.size() > 0) {
|
||||
selected.clear();
|
||||
hf.notifyUpdated();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case R.id.selection_toggle_unread:
|
||||
if (hf != null) {
|
||||
ArticleList selected = hf.getSelectedArticles();
|
||||
|
Loading…
Reference in New Issue
Block a user