Android开发 - 用户壁纸作为应用程序背景

时间:2013-09-17 06:27:59

标签: android background wallpaper homescreen

是否有可能以某种方式将用户主屏幕壁纸设置为Android应用程序的背景?我认为这可能是一种非常有趣的方式,让你的应用程序看起来更像是手机的一部分。

1 个答案:

答案 0 :(得分:0)

我无法对此进行测试,但您可以使用WindowManager,然后使用public static final int FLAG_SHOW_WALLPAPER

来自WindowManager文档 Window flag: ask that the system wallpaper be shown behind your window. The window surface must be translucent to be able to actually see the wallpaper behind it; this flag just ensures that the wallpaper surface will be there if this window actually has translucent regions.

您可以将窗口区域设置为透明,这可能会解决您的问题。这是一个聪明的主意,我很想知道结果如何。

相关问题