创建自己的LiveWallpaper preVIEW? [英] Creating own LiveWallpaperPreview?

查看:455
本文介绍了创建自己的LiveWallpaper preVIEW?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建自己的LiveWallpaper preVIEW,也就是向用户展示什么样的选择动态壁纸看起来像一个全屏preVIEW(不带设置墙纸和设置按钮,股票-OS preVIEW有)。

I would like to create my own LiveWallpaperPreview, i.e. to show the user a fullscreen preview of what the selected Live Wallpaper looks like (without the "Set Wallpaper" and "Settings" button that the stock-OS preview has).

从2.1重建LivePicker级(<一href="http://android.git.kernel.org/?p=platform/packages/wallpapers/LivePicker.git;a=tree;f=src/com/android/wallpaper/livepicker;h=1557e0ae77aa8b0f8191472a204b5a7b4add31a4;hb=master"相对=nofollow> android.git.kernel.org )的伟大工程,使我能够让用户选择一个背景是previewed,但实际LiveWallpaper preVIEW级试导入下面的私有接口/类:

Rebuilding the LivePicker-Class from 2.1 (android.git.kernel.org) works great, so I am able to let the user select a wallpaper to be previewed, but the actual LiveWallpaperPreview-Class tries to import the following private Interfaces/Classes:

进口android.service.wallpaper.IWallpaperConnection;
进口android.service.wallpaper.IWallpaperService;
进口android.service.wallpaper.IWallpaperEngine;
进口android.service.wallpaper.WallpaperSettingsActivity;

import android.service.wallpaper.IWallpaperConnection;
import android.service.wallpaper.IWallpaperService;
import android.service.wallpaper.IWallpaperEngine;
import android.service.wallpaper.WallpaperSettingsActivity;

有没有什么办法来显示我的应用程序中的LiveWallpaper而不诉诸使用私有的API(我显然不希望这样做)?

Is there any way to display a LiveWallpaper in my app without resorting to using the private APIs (which I obviously don't want to do)?

谢谢!

尼克

推荐答案

您无法做到这一点。在动态壁纸选择器是Android操作系统的一部分,不能被取代。

You cannot do this. The live wallpaper picker is part of the Android operating system and cannot be replaced.

这篇关于创建自己的LiveWallpaper preVIEW?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆