I have an Activity that is using the Theme.Dialog theme to present a dialog 
to the user.  By default however, when the user touches outside of the 
dialog window, the touch event is passed to the views of the Activity in 
the background.  For API level 11 devices and higher, I can use the 
following attribute in the Theme's style definition:

   <item name="android:windowCloseOnTouchOutside">false</item>

but of course this does not work on older (2.x) devices.  I have also tried 
these calls in onCreate():

   getWindow().setFlags(LayoutParams.FLAG_NOT_TOUCH_MODAL, 
LayoutParams.FLAG_NOT_TOUCH_MODAL);
   getWindow().setFlags(LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, 
LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);

Although these will notify my dialog Activity a onTouchEvent() call with 
a ACTION_OUTSIDE action, the event still gets passed back to the background 
activity and views.  How can I make my Theme.Dialog Activity modal without 
using a Dialog class explicitly?

Blake

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to