【问题标题】:Android Developing - Users Wallpaper as App BackgroundAndroid 开发 - 用户壁纸作为应用背景
【发布时间】:2013-09-17 06:27:59
【问题描述】:

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

【问题讨论】:

    标签: android background wallpaper homescreen


    【解决方案1】:

    我无法对此进行测试,但您可以使用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.

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

    【讨论】:

    • 你有什么运气吗?还是你就放弃了?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多