更新时间:2023-01-23 21:23:47
最简单的方法很可能是让服务弹出一个新的活动。要么你让活动本身看起来像一个对话框,通过在AndroidManifest.xml中添加适当的主题:
The easiest way would probably be to let the service pop up a new activity. Either you make the activity itself look like a dialog by adding the proper theme in the AndroidManifest.xml:
<活动机器人:DialogActivityNAME =机器人:主题=@安卓风格/ Theme.Dialog>
<activity android:name=".DialogActivity" android:theme="@android:style/Theme.Dialog">
或你犯了一个完全透明的活动,显示一个对话框,在启动时。
or you make a completely transparent activity that shows a dialog when it starts.