i am new at android.I am using three dots menu in my android app but when i click on item on on three dots menu..my app crashes.can someone help me here is my code:
enter code here@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.my_menu,menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id=item.getItemId();
switch (id){
case R.id.account:
Intent acc=new Intent(this,Account.class);
startActivity(acc);
break;
case R.id.setting:
Intent seting=new Intent(this,setting.class);
startActivity(seting);
break;
case R.id.feedback:
Intent feedback=new Intent(this,feedback.class);
startActivity(feedback);
break;
case R.id.help:
Intent help=new Intent(this,help.class);
startActivity(help);
break;
case R.id.faq:
Intent FAQ=new Intent(this,FAQ.class);
startActivity(FAQ);
break;
}
return true;
}