문제

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 fires 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top