0
I’m having problems with this code, I want the radio Buttons to appear for choice in a popup after pressing in parameters, only that’s not happening this,
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_desequilibrio, menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.desequilibrio_parametros:
return true;
default:
return super.onOptionsItemSelected(item);
}
}
This switch is weird. Your idea is to really return
trueand end the execution of the method? For if you observe well, whenever this method returnstrue, the block within the clausedefaultwill not be executed.– Bruno Gasparotto
Thanks, I managed to solve, it was my lack of attention.
– Luiz carlos