开发者

show pop-up from background service in android

开发者 https://www.devze.com 2023-01-16 00:16 出处:网络
Hi it is possible in android to show开发者_JAVA技巧 pop-up dialog from background running service?

Hi it is possible in android to show开发者_JAVA技巧 pop-up dialog from background running service? and answer is positive than how can i do that


There are several options. You can use a theme and make an activity look and behave like a dialog (as in this question) by setting the android:theme attribute of your <activity> to @android:style/Theme.Dialog or a customized theme in your manifest.

Alternatively, you could create a translucent activity by setting the theme to @android:style/Theme.Translucent.NoTitleBar and then launch a regular dialog from the activity. As the comments on one of the answers to the question advise, in this case just make sure to finish() the translucent activity whenever the dialog is dismissed.

0

精彩评论

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