1 / 8
文档名称:

Android动态壁纸的制作教程.doc

格式:doc   页数:8页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Android动态壁纸的制作教程.doc

上传人:zbfc1172 2015/5/18 文件大小:0 KB

下载得到文件列表

Android动态壁纸的制作教程.doc

文档介绍

文档介绍:动态壁纸是在Android 。动态壁纸可以添加到Android的桌面,具有交互式的动画背景效果。在本教程中,我们将教会你如何去制作一个交互式的动态壁纸。
动态壁纸是一个Android应用程序,包括一个服务(WallpaperService)。该服务必须包括一个引擎()。该引擎是连接用户、桌面、系统之间的桥梁。它也可以绘制桌面壁纸。
首先,必须由内在的Engine类创建一个WallpaperService类。"",这样它才会作为动态壁纸被手机识别。而且还要在服务配置中附加""的权限许可:
[size=+0]
<service
android:name="LiveWallpaperService"
android:enabled="true"
android:icon="***@drawable/icon"
android:label="***@string/app_name"
android:permission="">
<intent-filter android:priority="1" >
<action android:name="" />
</intent-filter>
<meta-data
android:name=""
android:resource="***@xml/wallpaper" />
</service>
复制代码
创建一个XML文件,放置在应用程序目录下的/res/xml/中。它用来描述你的动态壁纸。
<?xml version="" encoding="UTF-8"?>
<wallpaper
xmlns:android="http://schemas./apk/res/android"
android:thumbnail="***@drawable/thumbnail"
android:description="***@string/description"
android:settingsActivity="PreferenceActivity"/>
复制代码
再创建一个xml的属性文件,代码如下:
[size=+0]
<declare-styleable name="Wallpaper">
<!-- Component name of an activity that allows the user to modify
the current settings for this wallpaper. -->
<attr name="settingsActivity" />
<!-- Reference to a the wallpaper's thumbnail bitmap. -->
<att