Revert removal of menu items
This commit is contained in:
parent
665b9087b1
commit
7294220727
|
@ -97,10 +97,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
drawerItems = findViewById(R.id.navigation);
|
drawerItems = findViewById(R.id.navigation);
|
||||||
|
|
||||||
for(StreamingService s : NewPipe.getServices()) {
|
for(StreamingService s : NewPipe.getServices()) {
|
||||||
String title =
|
final String title = s.getServiceInfo().getName() +
|
||||||
s.getServiceInfo().getName() +
|
(ServiceHelper.isBeta(s) ? " (beta)" : "");
|
||||||
(ServiceHelper.isBeta(s) ? " (beta)" : "");
|
final MenuItem item = drawerItems.getMenu()
|
||||||
MenuItem item = drawerItems.getMenu()
|
|
||||||
.add(R.id.menu_services_group, s.getServiceId(), 0, title);
|
.add(R.id.menu_services_group, s.getServiceId(), 0, title);
|
||||||
item.setIcon(ServiceHelper.getIcon(s.getServiceId()));
|
item.setIcon(ServiceHelper.getIcon(s.getServiceId()));
|
||||||
}
|
}
|
||||||
|
@ -336,6 +335,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
case R.id.action_about:
|
case R.id.action_about:
|
||||||
NavigationHelper.openAbout(this);
|
NavigationHelper.openAbout(this);
|
||||||
return true;
|
return true;
|
||||||
|
case R.id.action_history:
|
||||||
|
NavigationHelper.openHistory(this);
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,27 @@
|
||||||
<?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"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item android:id="@+id/action_about"
|
<item
|
||||||
android:orderInCategory="1000"
|
android:id="@+id/action_show_downloads"
|
||||||
android:title="@string/action_about"/>
|
android:orderInCategory="980"
|
||||||
|
android:title="@string/downloads"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_history"
|
||||||
|
android:orderInCategory="981"
|
||||||
|
android:title="@string/action_history"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_settings"
|
||||||
|
android:orderInCategory="990"
|
||||||
|
android:title="@string/settings"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_about"
|
||||||
|
android:orderInCategory="1000"
|
||||||
|
android:title="@string/action_about"/>
|
||||||
</menu>
|
</menu>
|
Loading…
Reference in New Issue