tags:

views:

13

answers:

0

We have an activity which requires additional authentication. During onCreate and onResume (never both) showDialog is called and a custom dialog is created in onCreateDialog to request a password. The information on the Activity screen is sensitive so before showDialog is called we call Activity.setVisible(false). If the password from the dialog is valid, setVisible is called again and the activity is displayed. This all works fine.

If there is an error while processing the activity another activity which is styled android:style/Theme.Dialog displays error information and is user dismissed. onResume for the original activity is called which processes the password dialog again...

The screen goes blank - no visible activity or dialog. The application is still running and I can still navigate the dialog with the keyboard and mouse ("blind") from memory. I enter the password, press enter and the activity is visible again.

Why is the dialog not visible the second time but still navigable? I suspect a screen draw issue or something to do with using Activity.setVisible controlling what is displayed.

Android 1.6