[android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Blake B.
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

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Mark Murphy
On Fri, Dec 14, 2012 at 3:41 PM, Blake B. bbuckle...@yahoo.com wrote: 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

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Mark Murphy
On Fri, Dec 14, 2012 at 3:54 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Dec 14, 2012 at 3:41 PM, Blake B. bbuckle...@yahoo.com wrote: 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

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Blake B.
Mark, thanks for the quick reply. Well, this may not be a problem on older APIs after all. I was testing on 4.x devices (Moto Xoom and Samsung GSIII) and touch events outside of the dialog (the Activity using Theme.Dialog) cause the dialog activity to be cancelled and the events do get passed

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Mark Murphy
On Fri, Dec 14, 2012 at 4:32 PM, Blake B. bbuckle...@yahoo.com wrote: Well, this may not be a problem on older APIs after all. I was testing on 4.x devices (Moto Xoom and Samsung GSIII) and touch events outside of the dialog (the Activity using Theme.Dialog) cause the dialog activity to be

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Blake B.
Odd. May be related to my use of a drawable.xml for the dialog window background: *AndroidManifest.xml entry:* activity android:name=.RulesActivity android:theme=@style/RoundedCornerDialog

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Mark Murphy
On Fri, Dec 14, 2012 at 4:59 PM, Blake B. bbuckle...@yahoo.com wrote: I'd be curious to know if you still don't see it. Maybe there is something else I'm doing. No, still no change -- taps outside the dialog-themed activity have no effect. android:windowCloseOnTouchOutside is having no effect,

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Blake B.
Try this in your manifest. When I set them both to 8, the behavior goes away: uses-sdk android:minSdkVersion=8 android:targetSdkVersion=16 / Blake On Friday, December 14, 2012 4:19:07 PM UTC-6, Mark Murphy (a Commons Guy) wrote: On Fri, Dec 14, 2012 at 4:59 PM, Blake

Re: [android-developers] How to make Activity with Theme.Dialog modal?

2012-12-14 Thread Mark Murphy
On Fri, Dec 14, 2012 at 5:49 PM, Blake B. bbuckle...@yahoo.com wrote: Try this in your manifest. When I set them both to 8, the behavior goes away: uses-sdk android:minSdkVersion=8 android:targetSdkVersion=16 / Bingo. An android:targetSdkVersion of 11 or higher gives