I'm using an AlertDialog with 2 buttons (one positive, one negative). I've set a handler for those buttons which doesn开发者_JAVA技巧't mention dismiss. Indeed after clicking, I don't want the dialog to close. However, it seems that as soon as we click on a positive/negative button on an AlertDialog, it always get closed.
Is there a way to prevent the dialog from closing after clicking on any button ?
Thanks,
Vincent
Use custom layout for Dialog and you will be happy!
Use a custom dialog, not an AlertDialog.
You can also create a new Activity and assign it the theme dialog in your manifest with
<activity android:name="MyDialogActivity" android:theme="@android:style/Theme.Dialog" />
精彩评论