Giter VIP home page Giter VIP logo

android-lockscreen's Introduction

Android-LockScreen

应用图标

image

实现原理

参考百度锁屏、Go锁屏的原理,实现了上述各版本通用的锁屏示例app。支持“屏蔽”Android 4.0+的Home键,注意并非是真正的屏蔽,因为4.0之后,系统不允许在应用层屏蔽Home键,这里只是采用了一种巧妙的方式来绕过,就像是屏蔽了Home键一样。

PS:Android 6.0上,此方法对于Home键也不能完美起作用,应该是系统做了更严格的限制。百度锁屏在6.0上跟本demo效果类似,而Go锁屏在6.0上直接崩溃(测试机Nexus 6P)。

PPS:其实现在很多锁屏软件并非必须禁用Home键(关于完全禁用Home键的缺点在博客中也有提到),比如网易音乐、QQ音乐、惠锁屏等,而只是想在手机屏幕点亮时展示自己的一个入口,提供给用户一些有用的信息,如此而已。

详细的原理及实现可参考本人博客

锁屏效果

image

android-lockscreen's People

Contributors

aspook avatar

Watchers

James Cloos avatar Kalum Fernando avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.