Skip to content Skip to sidebar Skip to footer

Gradient Background Gets White When Closing Keyboard (only When List View Has Items)

I have a gradient that covers the whole background of my layout. However when I close the software keyboard it takes about 1 second for the gradient to resize to full height. This

Solution 1:

I've solved my problem. Instead of setting the background drawable for every activity, I set it in styles.xml like this

<stylename="AppTheme"parent="AppBaseTheme"><itemname="android:windowBackground">@drawable/gradient</item></style>

The white space disappears.

Solution 2:

it seems that the view is not getting invalidated after keyboard exits. Though i am not sure about the actual issue. I would suggest you to invalidate the view manually via code. Like,

container.invalidate();

http://developer.android.com/reference/android/view/View.html#invalidate()

Post a Comment for "Gradient Background Gets White When Closing Keyboard (only When List View Has Items)"