Android - How to display a dialog over a native screen?

后端 未结 2 1126
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 20:24

I was wondering if anyone can tell if how to pop a dialog screen up over a native Android screen?

I currently have an application that traps an outgoing call and sto

2条回答
  •  青春惊慌失措
    2020-11-29 21:03

    For my application I used an activity with the Dialog theme. You can declare the theme in the manifest file :

    
    
    • use launcheMode="singleInstance" and taskAffinity="" if your popup is detached from your main application. Otherwise user may click the back button and return to the previous activity of your application.
    • excludeFromRecents="true" to avoid your popup to appear in recent tasks (long press home)
    • theme="@android:style/Theme.Dialog" to set the Dialog theme.

提交回复
热议问题