Giter Site home page Giter Site logo

screensaver's Introduction

ScreenSaver

android和各种支持互动屏保的电视盒子制作屏保效果 #DreamService接口 主要是通过继承DreamService,扩展实现用户自定义屏保功能;用户只要安装重写该DreamService的apk,那么在其互动屏保设置中 就可以看到自己的自定义屏保,Dreams为系统提供一个灵活多变的展览和陈列显示的屏保。 同Activity一样DreamService也有其自己的生命周期:

  1. onAttachedToWindow() 在这里可以调用setContentView();一些初始化操作
  2. onDreamingStarted();这里可以开启一个动画或者其他行为,此时互动屏保已启动。
  3. onDreamingStopped();屏保停止,即终止上面启动的动画或行为
  4. onDetachedFormWindow();取出一些废弃的资源,如o从hndler或监听这那里 同时接口中的onCreate()和onDestroy()方法也会被请求,可以使用这些方法来初始化或者释放资源。 同时如何注册该servicei以及查看其它方法,可以参考https://developer.android.com/reference/android/service/dreams/DreamService.html #实现效果 如果要想实现“DayDream”互动屏保,首先你的设备要支持自定义互动屏保设置,在你安装完以后要能够在你的设备上看到 自定义的保如下图所示,其具体效果,大家可以克隆项目: Image text

screensaver's People

Contributors

youguyilin avatar

Stargazers

 avatar  avatar 流星雨 avatar 王艳聪 avatar  avatar  avatar  avatar  avatar 陶海理 avatar  avatar  avatar

Watchers

James Cloos avatar  avatar Charlie avatar KevinChen 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.