Package 

Class AndroidLiveWallpaperService.AndroidWallpaperEngine

    • Method Summary

      Modifier and Type Method Description
      void onCreate(SurfaceHolder surfaceHolder)
      void onSurfaceCreated(SurfaceHolder holder) Called before surface holder callbacks (ex for GLSurfaceView)!
      void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) This is called immediately after any structural changes (format or size) have been made to the surface.
      void onVisibilityChanged(boolean visible) Called to inform you of the wallpaper becoming visible or hidden.
      void onResume()
      void onPause()
      void onSurfaceDestroyed(SurfaceHolder holder) Called after surface holder callbacks (ex for GLSurfaceView)!
      void onDestroy()
      Bundle onCommand(String pAction, int pX, int pY, int pZ, Bundle pExtras, boolean pResultRequested)
      void onTouchEvent(MotionEvent event)
      void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset)
      WallpaperColors onComputeColors()
      • Methods inherited from class android.service.wallpaper.WallpaperService.Engine

        getDesiredMinimumHeight, getDesiredMinimumWidth, getDisplayContext, getSurfaceHolder, getWallpaperFlags, isPreview, isVisible, notifyColorsChanged, onApplyWindowInsets, onCommand, onComputeColors, onCreate, onDesiredSizeChanged, onDestroy, onOffsetsChanged, onSurfaceChanged, onSurfaceCreated, onSurfaceDestroyed, onSurfaceRedrawNeeded, onTouchEvent, onVisibilityChanged, onWallpaperFlagsChanged, onZoomChanged, setOffsetNotificationsEnabled, setTouchEventsEnabled
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AndroidLiveWallpaperService.AndroidWallpaperEngine

        AndroidLiveWallpaperService.AndroidWallpaperEngine()
    • Method Detail

      • onSurfaceCreated

         void onSurfaceCreated(SurfaceHolder holder)

        Called before surface holder callbacks (ex for GLSurfaceView)! This is called immediately after the surface is firstcreated. Implementations of this should start up whatever rendering code they desire. Note that only one thread can everdraw into a Surface, so you should not draw into the Surface here if your normal rendering will be in another thread.

      • onSurfaceChanged

         void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height)

        This is called immediately after any structural changes (format or size) have been made to the surface. You should atthis point update the imagery in the surface. This method is always called at least once, aftersurfaceCreated(SurfaceHolder).

      • onVisibilityChanged

         void onVisibilityChanged(boolean visible)

        Called to inform you of the wallpaper becoming visible or hidden. It is very important that a wallpaper only use CPUwhile it is visible..

      • onSurfaceDestroyed

         void onSurfaceDestroyed(SurfaceHolder holder)

        Called after surface holder callbacks (ex for GLSurfaceView)! This is called immediately before a surface is beingdestroyed. After returning from this call, you should no longer try to access this surface. If you have a renderingthread that directly accesses the surface, you must ensure that thread is no longer touching the Surface before returningfrom this function.Attention! In some cases GL context may be shutdown right now! and SurfaceHolder.Surface.isVaild = false

      • onOffsetsChanged

         void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset)