Sunday, June 12th, 2011 at
If you want more control over the content and life cycle of your dialog box, conventional Dialog class wont help much. In such cases the solution is to implement Dialog as a full Activity. You can implement any screen you want as Dialog and you will be able to have full access to the Activity life-cycle event handlers.
The easiest way to make an Activity look like a dialog is to apply the android:style/Theme.Dialog theme when you add it to your manifest. Refer the following XML snippet
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
This will cause Activity to behave as a Dialog, floating on top of, and partially obscuring the Activity beneath it.
Try this out!!