Can we interact with background activity when displaying a dialog over it in android

后端 未结 4 1600
深忆病人
深忆病人 2021-01-21 08:12

I want to display a dialog over an activity but still want to interact with background activity to perform something, while the dialog is being displayed. How can this be done?

4条回答
  •  [愿得一人]
    2021-01-21 09:11

    You could start a new Thread to perform this action. What I recommend is to implement an AsyncTask

    Here's a great tutorial to implement these stuff.

提交回复
热议问题