How can I display a user's live wallpaper as a background in my application?

I am creating a lockscreen replacement app for Android and would like to include the user selected wallpaper as the background of my application. This is pretty easy to do for static background images, but I'm not sure how to get live wallpapers in my application. Is it possible?

+5
source share
1 answer

Yes, it is very easy. Add the following topics to the topic:

<style name="MyAwesomeTheme" parent="@android:style/Theme.Holo.Or.Some.Other.Theme"> <!-- your other theme items... <!-- ADD THESE --> <item name="android:windowShowWallpaper">true</item> <item name="android:windowBackground">@android:color/transparent</item> </style> 

No other encoding is required.

+6
source

Source: https://habr.com/ru/post/1208542/


All Articles