Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Power consumption...<br> 1) The most important thing, by far, is that your wallpaper should switch itself off when it is not visible. The cube example handles this correctly, removing runnable callbacks in onDestroy(), onSurfaceDestroyed(), and onVisibilityChanged() (when visible == false).<br> 2) Beyond that, the largest determinant of power drain will be your frame rate. A 24 fps animation will drain much more juice than a clock that just updates at 1 fps to make its sweep-second hand tick. There's no way around this, except to educate the user, so that expectations are reasonable. An action game will kill your battery whether it's an app or a live wallpaper.</p> <p>Performance...<br> Drawing to a canvas has the benefit of simplicity, but for a very sophisticated wallpaper you will need to use OpenGL. There's GLWallpaperService, and AndEngine. The stock wallpapers are rigged to use RenderScript (you may find it useful to look up this code within the Android source tree -- much more sophisticated than the cube example in the SDK). And there was some talk about extending libGDX to handle wallpaper.</p> <p>Best Fit...<br> Well, it's just like the rest of Android: you need to design your artwork in terms of scalable proportions, query the device, and adjust accordingly. For a simple wallpaper, it's usually enough to scale your artwork in onSurfaceChanged(), where you are given the width and the height as parameters. In some cases you may want to examine the full DisplayMetrics.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload