I built my first Android app.
It is a Live Wallpaper designed for 2.2.
When I press and hold the screen, select Wallpapers and then select Live Wallpapers, my live wallpaper has what looks like a default icon with the name of my live wallpaper overlaid.
How do I set this icon?
My manifest file has an application icon specified as @drawable/icon
Update
I think I need to add some info to this question as it poorly describes my problem (sorry).
- I have all the
res/drawable-[hml]dpi/icons. I named them allicon.png. - My manifest file contains
<application android:label="@string/app_name" android:icon="@drawable/icon"> - I have also tried creating a 48×48 icon in
res/drawable/calledicon.png. - I have also tried explicitly adding icons in other manifest tags if they are allowed. eg. service, activity, intent-filter (It should be obvious that I don’t know how this manifest file really works, so I was trying anything)
- In
Manage Applications, the icon is displayed correctly. - When selecting the Live Wallpaper, the icon is not displayed correctly.
mdpiicon is 48×48,ldpiicon is 36×36 andhdpiicon is 72×72
In order to see an icon in the live wallpaper menu, you need to set the
android:thumbnailattribute for the applications<Wallpaper>tag. This will normally be found in the XML file corresponding to the class that extendsWallpaperService.Looking at the
CubeLiveWallpapersample application provided with the SDK, we see this tag to be located in cube1.xml and cube2.xml. A modified version below displays the icon thumb.png located inres/drawableand provides a description defined in strings.xmlNOTE: this works regardless of file extension, assuming that the format is a supported type – jpg. png etc