如何升级Froyo显示一个对话框顶部的主屏幕? [英] How does Froyo display a Dialog atop the home screen?

查看:89
本文介绍了如何升级Froyo显示一个对话框顶部的主屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用2.2(升级Froyo)一日前升级了我的Nexus。今天早上,当我去使用它,我看到一个对话框,上面坐着家庭/启动屏幕,通知我有更新可用,而且我可以选择现在或以后升级。

I upgraded my Nexus One a few days ago with 2.2 (Froyo). This morning when I went to use it I saw a Dialog sitting atop the home/launcher screen notifying me that an update was available and that I could choose to upgrade now or later.

我的问题是,什么样的API机制,这是用来显示一个对话框(也许是AlertDialog)之上的主屏幕?已经写了一个Android应用程序,这是我的理解是,对话框只能显示在上面活动,并且服务不能显示一个对话框(只有吐司)。

My question is, what API mechanisms is this using to show a Dialog (perhaps an AlertDialog) atop the home screen? Having written an Android app, it was my understanding that Dialogs could only be shown atop an Activity, and that a Service cannot show a Dialog (only a Toast).

时的谷歌也许是剥皮的活动看起来像一个对话框?是否有一个新的API方法可用于显示一个对话框,而无需一个活动?

Is Google perhaps skinning an Activity to look like a Dialog? Is there a new API method available for showing a Dialog without needing an Activity?

推荐答案

可以像主题的对话,一个活动的是有一段时间了(我认为1.6,甚至1.5)

You can theme an activity like the dialog, its been there for a while (i think 1.6, maybe even 1.5)

<activity android:name=".MyActivity" android:theme="@android:style/Theme.Dialog" />

这会产生什么样的,我相信你所看到的。

That would produce what I believe you are seeing.

这篇关于如何升级Froyo显示一个对话框顶部的主屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆