0

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);
Tim
  • 1,606
  • 2
  • 20
  • 32
  • if you feel that your question is answered might as well accept it to help future readers. – Vimal Dec 04 '11 at 05:45

2 Answers2

1

Whilst 'pheromix' is correct in associating an action to the pointerReleased region. You would also need to make setDisposeWhenPointerOutOfBounds(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

bharath
  • 14,283
  • 16
  • 57
  • 95
Vimal
  • 1,266
  • 1
  • 9
  • 16
0

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);
pheromix
  • 18,213
  • 29
  • 88
  • 158