6

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?

Jeremy White
  • 2,818
  • 6
  • 38
  • 74

1 Answers1

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