Skip to content

Instantly share code, notes, and snippets.

@derekbrameyer
Created January 11, 2012 14:29
Show Gist options
  • Save derekbrameyer/1594904 to your computer and use it in GitHub Desktop.
Save derekbrameyer/1594904 to your computer and use it in GitHub Desktop.
[Android] Activity background no-resize with resizable content
Problem: Set @android:background on root layout element, but you want the contents of the window to resize (e.g. with the soft keyboard opening). The background will then resize with the content.
Solution: Custom style in styles.xml
<style
name="whatever"
parent="whatever" >
<item name="android:windowBackground">@drawable/whatever</item>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment