|
|
@ -1,7 +1,6 @@ |
|
|
|
package cc.niushuai.dididone; |
|
|
|
package cc.niushuai.dididone; |
|
|
|
|
|
|
|
|
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.view.Menu; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity; |
|
|
|
import androidx.appcompat.app.AppCompatActivity; |
|
|
|
import androidx.core.view.LayoutInflaterCompat; |
|
|
|
import androidx.core.view.LayoutInflaterCompat; |
|
|
@ -60,7 +59,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
// Passing each menu ID as a set of Ids because each
|
|
|
|
// Passing each menu ID as a set of Ids because each
|
|
|
|
// menu should be considered as top level destinations.
|
|
|
|
// menu should be considered as top level destinations.
|
|
|
|
mAppBarConfiguration = new AppBarConfiguration.Builder( |
|
|
|
mAppBarConfiguration = new AppBarConfiguration.Builder( |
|
|
|
R.id.n_nav_calendar, R.id.n_nav_statistic, R.id.n_nav_statistic) |
|
|
|
R.id.n_nav_calendar, R.id.n_nav_statistic, R.id.n_nav_setting) |
|
|
|
.setOpenableLayout(drawer) |
|
|
|
.setOpenableLayout(drawer) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main); |
|
|
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main); |
|
|
@ -68,12 +67,12 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
NavigationUI.setupWithNavController(navigationView, navController); |
|
|
|
NavigationUI.setupWithNavController(navigationView, navController); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
// @Override
|
|
|
|
public boolean onCreateOptionsMenu(Menu menu) { |
|
|
|
// public boolean onCreateOptionsMenu(Menu menu) {
|
|
|
|
// Inflate the menu; this adds items to the action bar if it is present.
|
|
|
|
// // Inflate the menu; this adds items to the action bar if it is present.
|
|
|
|
getMenuInflater().inflate(R.menu.main, menu); |
|
|
|
// getMenuInflater().inflate(R.menu.main, menu);
|
|
|
|
return true; |
|
|
|
// return true;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean onSupportNavigateUp() { |
|
|
|
public boolean onSupportNavigateUp() { |
|
|
|