menu updates
This commit is contained in:
parent
d5f17058c4
commit
d7dfd661ce
@ -2,7 +2,12 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/show_feeds"
|
||||
android:icon="@android:drawable/ic_menu_rotate"
|
||||
android:title="@string/menu_unread_feeds"
|
||||
android:title="@string/menu_all_feeds"
|
||||
android:showAsAction=""/>
|
||||
|
||||
<item android:id="@+id/update"
|
||||
android:icon="@android:drawable/ic_menu_rotate"
|
||||
android:title="@string/update"
|
||||
android:showAsAction="ifRoom|withText"/>
|
||||
|
||||
<item android:id="@+id/preferences"
|
||||
|
@ -26,7 +26,8 @@
|
||||
<string name="no_unread_feeds">No unread feeds.</string>
|
||||
<string name="no_unread_headlines">No unread headlines.</string>
|
||||
<string name="loading_message">Loading, please wait...</string>
|
||||
<string name="menu_unread_feeds">Unread feeds</string>
|
||||
<string name="menu_all_feeds">All feeds</string>
|
||||
<string name="menu_unread_feeds">Show unread feeds</string>
|
||||
<string name="menu_all_feeds">Show all feeds</string>
|
||||
<string name="update">Update</string>
|
||||
|
||||
</resources>
|
||||
|
@ -61,7 +61,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
|
||||
list.setAdapter(m_adapter);
|
||||
list.setOnItemClickListener(this);
|
||||
|
||||
if (m_feed != null) refresh();
|
||||
if (m_feed != null)
|
||||
refresh();
|
||||
else
|
||||
view.findViewById(R.id.loading_container).setVisibility(View.GONE);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
@ -199,11 +199,14 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
||||
Intent intent = new Intent(this, PreferencesActivity.class);
|
||||
startActivityForResult(intent, 0);
|
||||
return true;
|
||||
case R.id.update:
|
||||
refreshFeeds();
|
||||
return true;
|
||||
case R.id.show_feeds:
|
||||
if (getUnreadOnly()) {
|
||||
item.setTitle(R.string.menu_all_feeds);
|
||||
} else {
|
||||
item.setTitle(R.string.menu_unread_feeds);
|
||||
} else {
|
||||
item.setTitle(R.string.menu_all_feeds);
|
||||
}
|
||||
|
||||
setUnreadOnly(!getUnreadOnly());
|
||||
|
Loading…
Reference in New Issue
Block a user