@@ -29,40 +29,13 @@ public class MainActivity extends AppCompatActivity {
2929 @ Override
3030 protected void onCreate (Bundle savedInstanceState ) {
3131 super .onCreate (savedInstanceState );
32-
3332 binding = ActivityMainBinding .inflate (getLayoutInflater ());
3433 setContentView (binding .getRoot ());
35-
3634 setSupportActionBar (binding .toolbar );
37-
3835 NavController navController = Navigation .findNavController (this , R .id .nav_host_fragment_content_main );
3936 appBarConfiguration = new AppBarConfiguration .Builder (navController .getGraph ()).build ();
4037 NavigationUI .setupActionBarWithNavController (this , navController , appBarConfiguration );
41-
4238 }
43-
44- // @Override
45- // public boolean onCreateOptionsMenu(Menu menu) {
46- // // Inflate the menu; this adds items to the action bar if it is present.
47- // getMenuInflater().inflate(R.menu.menu_main, menu);
48- // return true;
49- // }
50- //
51- // @Override
52- // public boolean onOptionsItemSelected(MenuItem item) {
53- // // Handle action bar item clicks here. The action bar will
54- // // automatically handle clicks on the Home/Up button, so long
55- // // as you specify a parent activity in AndroidManifest.xml.
56- // int id = item.getItemId();
57- //
58- // //noinspection SimplifiableIfStatement
59- // if (id == R.id.action_settings) {
60- // return true;
61- // }
62- //
63- // return super.onOptionsItemSelected(item);
64- // }
65-
6639 @ Override
6740 public boolean onSupportNavigateUp () {
6841 NavController navController = Navigation .findNavController (this , R .id .nav_host_fragment_content_main );
0 commit comments