It is possible to set an activity in a dialog?My dialog is part of the class1 extends activity, it possible to set my dialog with class 2 extends activity? I want that the whole activity 2 run in the dialog
Asked
Active
Viewed 49 times
0
-
1You can set a layout as the view for activity, but I am not sure its what you want. AFAIK you can't pass another activity as the layout. Will you please elaborate your requirement? – Arun Shankar May 13 '15 at 16:00
-
As @DevTest said, your question is unclear. Do you want the Activity2 layout to show in the dialog, do you want to start Activity2 from the dialog, do you want the whole Activity2 to run in the dialog? – codeMagic May 13 '15 at 16:02
-
I want the whole activity 2 run in the dialog of activity 1 – spyker10 May 13 '15 at 16:05
-
It is not possible AFAIK. Why can't you make the Activity "Class 2" as the dialog? – Arun Shankar May 13 '15 at 16:06
-
Because in a dialog there is a possibility to set setcancelable, in this way when I touched outside the view of dialog, the dialog does not close – spyker10 May 13 '15 at 16:12
-
setTheme(android.R.style.Theme_Dialog); Using this would open activity which has style of dialog. – kamilmasta May 13 '15 at 16:13
-
Maybe this is what you want to do http://stackoverflow.com/questions/14250404/unable-to-interact-with-android-custom-dialog/14250579#14250579 ? – codeMagic May 13 '15 at 16:14
1 Answers
0
Have you tried defining your Activity
as Dialog
in your AndroidManifest.xml
<activity android:theme="@android:style/Theme.Dialog" />

Jorgesys
- 124,308
- 23
- 334
- 268