是否可以使用一些代码行设置动态壁纸.例如,我想告诉我的用户,可以使用动态壁纸单击此处进行设置".
Is it possible to set a live wallpaper using some lines of code. For example, i want to tell my users that a live wallpaper is available "click here to set it".
推荐答案好的,只是为了避免我对过时的答案投下反对票.有关更强大的解决方案,请参见下面的错误454的答案,该解决方案将使用户直接进入Jelly Bean和up设备上的墙纸预览屏幕.
Alright, just so I stop getting downvotes for an outdated answer. Please see Error 454's answer below for a more robust solution which will send the user directly to the wallpaper preview screen on Jelly Bean and up devices.
======================================
========================================
这是启动墙纸选择器的方法,用户可以从中选择墙纸.吐司只是向用户解释发生了什么情况的一种方式.
Here's how to start the wallpaper chooser, from which the user can select your wallpaper. The toast is just a way to explain to the user what's going on.
Toast toast = Toast.makeText(this, "Choose '<WALLPAPER NAME>' from the list to start the Live Wallpaper.",Toast.LENGTH_LONG); toast.show(); Intent intent = new Intent(); intent.setAction(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER); startActivity(intent);更多推荐
以编程方式设置动态壁纸
发布评论