Android 4.2中添加解锁项
在Android 4.2中系统默认解锁是滑动到任意位置后就会解锁,如果想添加解锁内容需要修改如下代码:
1.frameworks/base/core/res/res/layout/keyguard_glow_pad_view.xml
[html]
- prvandroid:targetDrawables="@array/lockscreen_targets_unlock_only"
- prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_unlock_only"
+ prvandroid:targetDrawables="@array/lockscreen_targets_with_camera"
+ prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
- prvandroid:targetDrawables="@array/lockscreen_targets_unlock_only"
- prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_unlock_only"
+ prvandroid:targetDrawables="@array/lockscreen_targets_with_camera"
+ prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
这样在解锁时就会默认增加相机以及google搜索。
2.如果想要添加自定易做图锁内容,只需要按照Android原生模板进行添加或者修改即可。
补充:移动开发 , Android ,