I have an Activity named whereActity which has child dialogs as well. Now, I want to display this activity as a dialog for another activity.
How can I do that?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To start activity as dialog I defined it like this in
AndroidManifest.xml:Use this property inside your
activitytag to avoid that your Dialog appears in the recently used apps listIf you want to stop your dialog / activity from being destroyed when the user clicks outside of the dialog:
After
setContentView()in yourActivityuse:this.setFinishOnTouchOutside(false);Now when I call
startActivity()it displays as a dialog, with the previous activity shown when the user presses the back button.Note that if you are using
ActionBarActivity(or AppCompat theme), you’ll need to use@style/Theme.AppCompat.Dialoginstead.