如何为您的动态壁纸添加图标
我的动态壁纸有一个图标,在安装之前会显示,但是安装后进入壁纸>动态壁纸,里面没有图标,只是一个空的灰色图像。 我的动态壁纸有一个图标,在安装之前会显示,但是安装后进入壁纸>动态壁纸,里面没有图标,只是一个空的灰色图像。
这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.0" package="com.cutecats.cats"
android:versionCode="1">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:icon="@drawable/icon"
android:label="@string/app_name">
<service
android:name=".CubeWallpaper1"
android:icon="@drawable/icon"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter android:icon="@drawable/icon">
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="@xml/cube1" />
</service>
<activity
android:label="@string/cube2_settings"
android:name=".CubeWallpaper1Settings"
android:icon="@drawable/icon"
android:exported="true" >
</activity>
</application>
</manifest>
My live wallpaper has an Icon, it shows before you install it, but after you install it and you go to Wallpaper>Live Wallpaper, there is no icon in it, it's just an empty gray image.
My live wallpaper has an Icon, it shows before you install it, but after you install it and you go to Wallpaper>Live Wallpaper, there is no icon in it, it's just an empty gray image.
Here is my Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.0" package="com.cutecats.cats"
android:versionCode="1">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:icon="@drawable/icon"
android:label="@string/app_name">
<service
android:name=".CubeWallpaper1"
android:icon="@drawable/icon"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter android:icon="@drawable/icon">
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="@xml/cube1" />
</service>
<activity
android:label="@string/cube2_settings"
android:name=".CubeWallpaper1Settings"
android:icon="@drawable/icon"
android:exported="true" >
</activity>
</application>
</manifest>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,动态壁纸的图标有不同类型。每个节目都有自己的时间,您所说的实际上是缩略图,需要放置在
标签内。
我是这样做的:我使用以下代码创建了 pony.xml 文件:
在清单文件内我有以下内容:
请注意对 pony.xml 的引用。
另外,不要忘记将图标设置为适当的尺寸(例如 64x64)。
There are different types of icons for live wallpaper from what i understand. Each shows in its own time, and what you are talking about is actually a thumbnail and needs to be placed inside
tag.
Here is how i did it: i created pony.xml file with following code:
Inside manifest file i have following:
Note the reference to pony.xml.
Also, don't forget to have your icon in appropriate size (e.g. 64x64).