public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
Intent intent=new Intent(this,SecondActivity.class);
startActivity(getIntent());
return true;
}
return super.onOptionsItemSelected(item);
}
为什么startActivity(Intent)方法输入getIntent()方法无法获取到Intent对象啊?点击菜单选项无反应。