开发者

Activity act as REAL dialog

开发者 https://www.devze.com 2023-02-04 14:27 出处:网络
I have an activity, that has in manifest: android:theme=\"@android:style/Theme.Dialog\" When I start it, it looks like an activity, but when I close it it fi开发者_StackOverflow中文版res the onResu

I have an activity, that has in manifest:

android:theme="@android:style/Theme.Dialog"

When I start it, it looks like an activity, but when I close it it fi开发者_StackOverflow中文版res the onResume on the activity that started it. A real dialog will not do it. How can I avoid the onResume?


You can't - it's an activity. You could add some state machine to the calling activity using onPause etc. but that could get messy.


You should use a Dialog instead. Using the method

setContentView(View view)

For "filling" it

0

精彩评论

暂无评论...
验证码 换一张
取 消