I am using a DialogFragment
to display a list of menu items in the dialog by setting the items based on a string array.
public class MenuDialogFragment extends
private Menu mMenu;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.dialog_title)
.setItems(R.array.menu_array, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case 0:
// ...
}
}
});
return builder.create();
}
What do I need to do, to deactivate (disable) one of the menu item entries? How can I get hold of them? Didn't find the right method in DialogFragment