I am creating a lockscreen replacement app for Android and would like to incorporate the user's currently selected wallpaper as my app's background. This is pretty easy to do for static background images, but I am not sure how to get a live wallpaper into my app. Is this possible?
Asked
Active
Viewed 1,172 times
1 Answers
10
Yes, it's very easy. Add the following items to your theme:
<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 coding is necessary.

Christian Göllner
- 5,808
- 4
- 19
- 20
-
Waaat. That looks so easy. I'll give it a shot this evening. Thanks! – Jeremy White Dec 08 '14 at 19:46
-
Worked! It even responds to my touch gestures. Very slick. – Jeremy White Dec 09 '14 at 05:14
-
1@ChristianGöllner How do i support wallpaper scroll on swipe left and right? – Redone Dec 26 '15 at 07:12