How do I display Android dialog-type activities?

Asked 1 years ago, Updated 1 years ago, 84 views

1

There's an activity called whereActivity. I put in a dialog as child. I want to show this activity as a dialog for another activity. What should I do?

android android-activity android-dialog

2022-09-21 17:23

1 Answers

You can define it as dialog in the Android manifest file.

<activity android:theme="@android:style/Theme.Dialog" />

And go to the call point you want and startActivity() and it will appear in a dialog. And if you press the Back button, the previous activity will be displayed


2022-09-21 17:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.