在锁屏前活动 [英] Activity in front of Lockscreen

查看:175
本文介绍了在锁屏前活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在锁屏前创建活动。我并不想跳过键盘锁完全。我trye​​d它与TYPE_SYSTEM_OVERLAY标志但我不能韩德尔任何事件。它的工作原理与FLAG_SHOW_WHEN_LOCKED但有一个黑色的背景,我希望它像这样的画面:

I want to create an activity in front of the lockscreen. I don't want to skip the keyguard completely. I tryed it with the TYPE_SYSTEM_OVERLAY flag but there I can't handel any events. It works with FLAG_SHOW_WHEN_LOCKED but then there is a black background and i want it like on this picture:

没有黑色的背景和事件处理的活动 http://s1.directupload.net/images/130306/sctc586t.jpg

An Activity without black background and event handling http://s1.directupload.net/images/130306/sctc586t.jpg

这将是很好,如果它像TYPE_SYSTEM_OVERLAY但事件处理。那可能吗?我看,这是不可能的TYPE_SYSTEM_OVERLAY得到任何活动,但也许有另一种选项设置一个活动在锁屏的前面?也许具有root权限?它应该看起来像它的图片。

It would be nice if it is like TYPE_SYSTEM_OVERLAY but with event handling. Is that possible? I read that it is not possible with TYPE_SYSTEM_OVERLAY to get any Events but is there maybe another option to set an activity in front of the lockscreen? Maybe with root rights? It should look like it is in the picture.

推荐答案

要避免黑色背景尝试半透明的主题。在你的清单(活动或应用程序),使用安卓主题=机器人:款式/ Theme.Translucent

To avoid black background try a translucent theme. At your manifest (activity or application) use android:theme="android:style/Theme.Translucent"

还有一种方法来创建小部件的某些设备的锁屏来自不同制造商,据我所知HTC开发者页面上有这样的工具,但我从来没有测试,恐怕只有在Sense装置的工作原理。

There is also a way to create widgets for lock screen of some devices from different manufactures, as far as I know HTC developer page has such a tool, but I have never tested and I am afraid that works only on sense devices.

如果你只对一个设备也可以看看你的兴趣生产开发页面!

If you are only interested for a devices you can also look at your manufactures developer page!

编辑:

其他相关网站:

  1. 的Andr​​oid锁屏小工具
  2. 4.2产品特点: http://developer.android.com/约/版本/ Android的4.2.html#锁屏
  1. Android Lock Screen Widget
  2. Features of 4.2: http://developer.android.com/about/versions/android-4.2.html#Lockscreen

这篇关于在锁屏前活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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