phi*_*urn 15 android live-wallpaper
我构建了我的第一个Android应用.
这是一款专为2.2设计的动态壁纸.
当我按住屏幕,选择Wallpapers
然后选择时Live Wallpapers
,我的动态壁纸看起来像一个默认图标,其中我的动态壁纸的名称被覆盖.
如何设置此图标?
我的清单文件有一个指定为的应用程序图标 @drawable/icon
更新
我想我需要在这个问题上添加一些信息,因为它很难描述我的问题(对不起).
res/drawable-[hml]dpi/
图标.我把它们全部命名了icon.png
.<application android:label="@string/app_name" android:icon="@drawable/icon">
res/drawable/
被叫中创建一个48x48图标icon.png
.Manage Applications
,图标显示正确.mdpi
图标为48x48,ldpi
图标为36x36,hdpi
图标为72x72小智 36
要在动态壁纸菜单中查看图标,您需要设置android:thumbnail
应用程序<Wallpaper>
标记的属性.这通常可以在与扩展的类对应的XML文件中找到WallpaperService
.
查看CubeLiveWallpaper
随SDK提供的示例应用程序,我们看到此标记位于cube1.xml和cube2.xml中.下面的修改版本显示了位于其中的图标thumb.png,res/drawable
并提供了strings.xml中定义的描述
<wallpaper
xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="@drawable/thumb"
android:description="@string/description"
android:settingsActivity="com.example.android.livecubes.cube2.CubeWallpaper2Settings"
/>
Run Code Online (Sandbox Code Playgroud)
注意:无论文件扩展名如何,这都适用,假设格式是受支持的类型 - jpg.png等
归档时间: |
|
查看次数: |
11901 次 |
最近记录: |