diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index e2874709b..d9ea66870 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -493,6 +493,9 @@ public class MainActivity extends AppCompatActivity { if (!(fragment instanceof SearchFragment)) { findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE); + + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.main_menu, menu); } ActionBar actionBar = getSupportActionBar(); @@ -514,6 +517,14 @@ public class MainActivity extends AppCompatActivity { case android.R.id.home: onHomeButtonPressed(); return true; + case R.id.action_show_downloads: + return NavigationHelper.openDownloads(this); + case R.id.action_history: + NavigationHelper.openStatisticFragment(getSupportFragmentManager()); + return true; + case R.id.action_settings: + NavigationHelper.openSettings(this); + return true; default: return super.onOptionsItemSelected(item); } diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml new file mode 100644 index 000000000..05920099a --- /dev/null +++ b/app/src/main/res/menu/main_menu.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file