0

I have an activity ( let's say First Activity ) and from this, I start new Activity call Second Activity.

The second activity has been set to used Theme Dialog. I don't want use the default reaction that is to dismiss dialog when user presses outside of Second activity ( I have Cancel button to deal with that).

But in fact, when I press outside ( touch outside), if I touch a position that has a control in the First activity , then this control receives my touch event ( also dismiss the Second Activity Dialog).

How can I prevent First activity from receiving touch event on Second Dialog activity ?

Any suggest really helps me a lot , thanks !

toantran
  • 1,789
  • 17
  • 25
  • 2
    see [this](http://stackoverflow.com/questions/4650246/how-to-cancel-an-dialog-themed-like-activity-when-touched-outside-the-window/5831214#5831214) post for same issue – ρяσѕρєя K Jan 07 '13 at 07:42
  • Yes, thanks, I have come to that post before posting this question. Now after reading it again, I found a trick that is to DISABLE the problematic UI segment in onPause() and get it back in onResume() . Try it now :) thank you Developers :) – toantran Jan 07 '13 at 07:57
  • Does your 2nd Activity have a Dialog view? If so, `setCancelable(false)` may be what you want. – CjS Jan 07 '13 at 08:01
  • @CjS No, actually as I said my Second Activity use Theme Dialog , so the whole Second activity can pop over the First Activity ( with area around is transparent), I don't have a Dialog widget to setCancelable() – toantran Jan 07 '13 at 08:16

0 Answers0