Creating a Live Wallpaper Definition Resource

The Live Wallpaper resource definition is an XML file stored in the res/xml folder. Use attributes within the <wallpaper> tag to define the author name, wallpaper description, and thumbnail to display in the Live Wallpaper gallery at run time. You can also use the settingsActivity tag to specify an Activity to launch to configure the wallpaper's settings.

Listing 10-25 shows a sample Live Wallpaper resource.

LISTING 10-25: Sample Live Wallpaper resource definition download on <wallpaper xmlns:android="" android:author="@string/author"

android:description="@string/description" android:thumbnail="@drawable/wallpapericon"

Note that you must use references to existing string resources for the author and description attribute values. String literals are not valid.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide

Post a comment