Starting a View from a Service?

后端 未结 6 1495
攒了一身酷
攒了一身酷 2020-12-10 17:52

Already asked a similar question, yet without much luck.

Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intract

6条回答
  •  没有蜡笔的小新
    2020-12-10 18:20

    What you want is an Activity instead of a Service and a Dialog instead View. I suggest you read this document by google: http://developer.android.com/guide/topics/fundamentals.html

    However to answer your question about both being interactable. This isn't possible. At any given time 1 and only 1 activity is on the top of the activity stack. The user can only interact with that activity. If you want something like a floating window then will have to create it yourself. Although keep in mind that goes against the android design principles.

提交回复
热议问题