I want to be able to press the other buttons on my screen when open dialog.
Dialog menuDialog = new Dialog("Dialog Demo");
menuDialog.setTimeout(1000);
menuDialog.show(90, 90, 10, 10, true);
I want to be able to press the other buttons on my screen when open dialog.
Dialog menuDialog = new Dialog("Dialog Demo");
menuDialog.setTimeout(1000);
menuDialog.show(90, 90, 10, 10, true);
Don't use directly a Dialog but create a class which derives Dialog
. Implement the pointerReleased
method , assuming that the device is tactile
, and test if the x
and y
params are contained inside the area delimited by the Buttons's coordinates :
if ( ( x >= btn.getAbsoluteX() && x <= btn.getAbsoluteX() + btn.getPreferredW() ) && ( y >= btn.getAbsoluteY() && y <= btn.getAbsoluteY() + btn.getPreferredH() ) )
// execute the Buttons's action method
else
super.pointerReleased(x,y);
Whilst 'pheromix' is correct in associating an action to the
pointerReleased
region. You would also need to makesetDisposeWhenPointerOutOfBounds(false)
in the derived Dialog class.You can also refer the detailed explanation here http://www.java.net/forum/topic/mobile-embedded/lwuit/how-remove-screen-dimming-when-presented-dialog-2