@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.bottm_nav, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
Toast.makeText(MainActivity.this, "Home", Toast.LENGTH_LONG).show();
webView.loadUrl("http://47.98.153.82/test.html");
break;
case R.id.navigation_dashboard:
webView.loadUrl("https://www.baidu.com");
break;
default:
break;
}
return true;
}
网友评论