Android Programming Press on the image to return to the main documentation page.

LiveWallpaper

List of types:

LWEngine
LWManager

LWEngine

Represents a wallpaper instance.
A tutorial is available here.

Events:

None

Members:


  Canvas As CanvasWrapper [read only]

  CurrentOffsetX As Int [read only]

  CurrentOffsetY As Int [read only]

  FullWallpaperHeight As Int [read only]

  FullWallpaperWidth As Int [read only]

  IsInitialized As Boolean

  IsPreview As Boolean [read only]

  IsVisible As Boolean [read only]

  Rect As RectWrapper

  Refresh (DirtyRect As android.graphics.Rect)

  RefreshAll

  ScreenHeight As Int [read only]

  ScreenWidth As Int [read only]

  Tag As Object

Members description:

Canvas As CanvasWrapper [read only]
Returns the canvas which is used to draw on the wallpaper.
Changes will not be visible till you call Refresh or RefreshAll.
CurrentOffsetX As Int [read only]
Returns the current horizontal offset related to the full wallpaper width.
CurrentOffsetY As Int [read only]
Returns the current vertical offset related to the full wallpaper height.
FullWallpaperHeight As Int [read only]
Returns the full wallpaper height.
FullWallpaperWidth As Int [read only]
Returns the full wallpaper width. A wallpaper can be made of several screens.
IsInitialized As Boolean
Tests whether this object is initialized.
IsPreview As Boolean [read only]
Tests whether this wallpaper is running in "preview mode".
IsVisible As Boolean [read only]
Tests whether this wallpaper is visible.
Rect As RectWrapper
A convenient Rect object which you can use. This object is not used internally.
Refresh (DirtyRect As android.graphics.Rect)
Refreshes the given region.
RefreshAll
Refreshes the complete screen.
ScreenHeight As Int [read only]
Returns the screen height.
ScreenWidth As Int [read only]
Returns the screen width.
Tag As Object
Gets or sets the Tag value. This is a place holder which can used to store additional data.

LWManager

Manages the wallpaper events and the timer.
A tutorial is available here.

Events:

SizeChanged (Engine As LWEngine)
Touch (Engine As LWEngine, Action As Int, X As Float, Y As Float)
VisibilityChanged (Engine As LWEngine, Visible As Boolean)
EngineDestroyed (Engine As LWEngine)
Tick (Engine As LWEngine)
OffsetChanged (Engine As LWEngine)

Members:


  Initialize (EventName As String, TouchEventsEnabled As Boolean)

  StartTicking (IntervalMs As Int)

  StopTicking

Members description:

Initialize (EventName As String, TouchEventsEnabled As Boolean)
Initializes the object.
EventName - Sets the Subs that will handle the events.
TouchEventsEnabled - Whether the wallpaper should raise the Touch event when the user touches the screen.
StartTicking (IntervalMs As Int)
Starts the internal timer.
IntervalMs - Interval in milliseconds.
StopTicking
Stops the internal timer.
Top