Honeycomb 中的非全屏 Activity?
我希望在 Android 3+(Honeycomb)上有一个非全屏 Activity 仅占据全屏的三分之一,以便其他部分是透明的并且其他应用程序会显示。所以我的应用程序实际上会漂浮在其他打开的应用程序之上。
是否可以有一个只占全屏1/3的Activity?
如果可能的话,这是否违反 Honeycomb UI 指南?
I'd like to have a non-fullscreen Activity only taking about one third of full screen on Android 3+ (Honeycomb), so that other part would be transparent and other apps would show. So my app would actually float above other open apps.
Is it possible to have an Activity that only takes 1/3 of the full screen?
If possible, is this against Honeycomb UI guidelines?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答我自己的问题是为了让您知道我的发现:
如果 Activity 是使用
Theme.Dialog
创建的,那么它会居中并且无法移动它。此外,它周围的区域是灰色的,并且无法访问底层活动或桌面(即活动窗口是模态的)。因此,没有一种实用的方法可以让 Android 中的非全屏窗口像桌面操作系统上的窗口一样充当浮动窗口。Answering my own question to let you know what I discovered:
If activity is created with
Theme.Dialog
, then it is centered and there is no way to move it. Also area around it is dimmed and there is no access to underlying activities or desktop (i.e. activity window is modal). So there is no practical way of having a non-fullscreen window in Android that would behave as a floating window in a similar way as windows on desktop OSes do.