IT. Expert System.

Android Reference



Class WallpaperService.Engine

  • Enclosing class:

    public class WallpaperService.Engine
    extends Object
    The actual implementation of a wallpaper. A wallpaper service may have multiple instances running (for example as a real wallpaper and as a preview), each of which is represented by its own Engine instance. You must implement WallpaperService.onCreateEngine() to return your concrete Engine implementation.
    • Constructor Detail

      • WallpaperService.Engine

        public WallpaperService.Engine()
    • Method Detail

      • getSurfaceHolder

        public SurfaceHolder getSurfaceHolder()
        Provides access to the surface in which this wallpaper is drawn.
      • isVisible

        public boolean isVisible()
        Return whether the wallpaper is currently visible to the user, this is the last value supplied to onVisibilityChanged(boolean).
      • isPreview

        public boolean isPreview()
        Returns true if this engine is running in preview mode -- that is, it is being shown to the user before they select it as the actual wallpaper.
      • setTouchEventsEnabled

        public void setTouchEventsEnabled(boolean enabled)
        Control whether this wallpaper will receive raw touch events from the window manager as the user interacts with the window that is currently displaying the wallpaper. By default they are turned off. If enabled, the events will be received in onTouchEvent(MotionEvent).
      • setOffsetNotificationsEnabled

        public void setOffsetNotificationsEnabled(boolean enabled)
        Control whether this wallpaper will receive notifications when the wallpaper has been scrolled. By default, wallpapers will receive notifications, although the default static image wallpapers do not. It is a performance optimization to set this to false.
        enabled - whether the wallpaper wants to receive offset notifications
      • setFixedSizeAllowed

        public void setFixedSizeAllowed(boolean allowed)
      • onCreate

        public void onCreate(SurfaceHolder surfaceHolder)
        Called once to initialize the engine. After returning, the engine's surface will be created by the framework.
      • onDestroy

        public void onDestroy()
        Called right before the engine is going away. After this the surface will be destroyed and this Engine object is no longer valid.
      • onVisibilityChanged

        public void onVisibilityChanged(boolean visible)
        Called to inform you of the wallpaper becoming visible or hidden. It is very important that a wallpaper only use CPU while it is visible..
      • onTouchEvent

        public void onTouchEvent(MotionEvent event)
        Called as the user performs touch-screen interaction with the window that is currently showing this wallpaper. Note that the events you receive here are driven by the actual application the user is interacting with, so if it is slow you will get fewer move events.
      • onOffsetsChanged

        public void onOffsetsChanged(float xOffset,
                            float yOffset,
                            float xOffsetStep,
                            float yOffsetStep,
                            int xPixelOffset,
                            int yPixelOffset)
        Called to inform you of the wallpaper's offsets changing within its contain, corresponding to the container's call to WallpaperManager.setWallpaperOffsets().
      • onCommand

        public Bundle onCommand(String action,
                       int x,
                       int y,
                       int z,
                       Bundle extras,
                       boolean resultRequested)
        Process a command that was sent to the wallpaper with WallpaperManager.sendWallpaperCommand(android.os.IBinder, java.lang.String, int, int, int, android.os.Bundle). The default implementation does nothing, and always returns null as the result.
        action - The name of the command to perform. This tells you what to do and how to interpret the rest of the arguments.
        x - Generic integer parameter.
        y - Generic integer parameter.
        z - Generic integer parameter.
        extras - Any additional parameters.
        resultRequested - If true, the caller is requesting that a result, appropriate for the command, be returned back.
        If returning a result, create a Bundle and place the result data in to it. Otherwise return null.
      • onDesiredSizeChanged

        public void onDesiredSizeChanged(int desiredWidth,
                                int desiredHeight)
        Called when an application has changed the desired virtual size of the wallpaper.
      • onSurfaceChanged

        public void onSurfaceChanged(SurfaceHolder holder,
                            int format,
                            int width,
                            int height)
        Convenience for SurfaceHolder.Callback.surfaceChanged().
      • onSurfaceRedrawNeeded

        public void onSurfaceRedrawNeeded(SurfaceHolder holder)
        Convenience for SurfaceHolder.Callback.surfaceRedrawNeeded().
      • onSurfaceCreated

        public void onSurfaceCreated(SurfaceHolder holder)
        Convenience for SurfaceHolder.Callback.surfaceCreated().
      • onSurfaceDestroyed

        public void onSurfaceDestroyed(SurfaceHolder holder)
        Convenience for SurfaceHolder.Callback.surfaceDestroyed().


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 558 / 158855892. Delta: 0.03929 с