again im having a issues, I’m trying to get when a menu item is clicked then it’ll open up a box that has a title and maybe a text box/ btn in it how could I do this?
This is what menu code im using
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.icon: Toast.makeText(this, "You pressed the icon!", Toast.LENGTH_LONG).show();
break;
case R.id.text: Toast.makeText(this, "You pressed the text!", Toast.LENGTH_LONG).show();
break;
case R.id.icontext: Toast.makeText(this, "You pressed the icon and text!", Toast.LENGTH_LONG).show();
break;
}
return true;
}
}
Take a look at
AlertDialog. This post has some good examples of creating dialogs. Hope this helps.