Call superclass method when creating and preparing menu. fixes #278
This commit is contained in:
parent
f1a45f1308
commit
b06186b300
|
@ -206,6 +206,7 @@ public class AddFeedActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -280,6 +280,7 @@ public class DirectoryChooserActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
menu.findItem(R.id.new_folder_item)
|
||||
.setVisible(isValidFile(selectedDir));
|
||||
return true;
|
||||
|
@ -287,6 +288,7 @@ public class DirectoryChooserActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.directory_chooser, menu);
|
||||
return true;
|
||||
|
|
|
@ -183,6 +183,7 @@ public class DownloadActivity extends ActionBarActivity implements
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, MENU_SHOW_LOG, Menu.NONE,
|
||||
R.string.show_download_log),
|
||||
MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
||||
|
|
|
@ -59,6 +59,7 @@ public class DownloadLogActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ public class FeedInfoActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
if (feed != null) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.feedinfo, menu);
|
||||
|
@ -106,6 +107,7 @@ public class FeedInfoActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
if (feed != null) {
|
||||
menu.findItem(R.id.support_item).setVisible(
|
||||
feed.getPaymentLink() != null);
|
||||
|
|
|
@ -114,6 +114,7 @@ public class FeedItemlistActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
if (feed != null) {
|
||||
TypedArray drawables = obtainStyledAttributes(new int[]{R.attr.action_search});
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
|
||||
|
@ -139,6 +140,7 @@ public class FeedItemlistActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
return FeedMenuHandler.onPrepareOptionsMenu(menu, feed);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,7 @@ public class FlattrAuthActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ public class ItemviewActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
if (item != null) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.feeditem, menu);
|
||||
|
@ -156,6 +157,7 @@ public class ItemviewActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(final Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
return FeedItemMenuHandler.onPrepareMenu(
|
||||
new FeedItemMenuHandler.MenuInterface() {
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ public class MainActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
MenuItem refreshAll = menu.findItem(R.id.all_feed_refresh);
|
||||
if (DownloadService.isRunning
|
||||
&& DownloadRequester.getInstance().isDownloadingFeeds()) {
|
||||
|
@ -178,6 +179,7 @@ public class MainActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.main, menu);
|
||||
|
||||
|
|
|
@ -222,6 +222,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.mediaplayer, menu);
|
||||
return true;
|
||||
|
@ -229,6 +230,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
Playable media = controller.getMedia();
|
||||
|
||||
menu.findItem(R.id.support_item).setVisible(
|
||||
|
|
|
@ -51,6 +51,7 @@ public class MiroGuideCategoryActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ public class MiroGuideChannelViewActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.channelview, menu);
|
||||
return true;
|
||||
|
@ -139,6 +140,7 @@ public class MiroGuideChannelViewActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
boolean channelLoaded = channel != null;
|
||||
boolean beingDownloaded = channelLoaded
|
||||
&& DownloadRequester.getInstance().isDownloadingFile(
|
||||
|
|
|
@ -128,6 +128,7 @@ public class MiroGuideMainActivity extends ActionBarActivity implements AdapterV
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
|
||||
.setIcon(
|
||||
obtainStyledAttributes(
|
||||
|
|
|
@ -63,6 +63,7 @@ public class MiroGuideSearchActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
|
||||
.setIcon(
|
||||
obtainStyledAttributes(
|
||||
|
|
|
@ -101,6 +101,7 @@ public class OpmlFeedChooserActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.select_all_item, Menu.NONE,
|
||||
R.string.select_all_label),
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
|
|
|
@ -87,6 +87,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ public class PlaybackHistoryActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.clear_history_item, Menu.NONE,
|
||||
R.string.clear_history_label),
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
|
|
|
@ -300,6 +300,7 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public class SearchActivity extends ActionBarActivity implements AdapterView.OnI
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
|
||||
.setIcon(
|
||||
obtainStyledAttributes(
|
||||
|
|
|
@ -24,6 +24,7 @@ public class GpodnetActivity extends ActionBarActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
|
||||
.setIcon(
|
||||
obtainStyledAttributes(
|
||||
|
|
Loading…
Reference in New Issue