DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Solomon Chigozie
Solomon Chigozie

Posted on

How To Solve the issue of WebView not redirecting to payment gateway or showing white screen

If you are having a blank page when redirecting to another url within your WebView Android application or when redirecting to a payment gateway, this is how to resolve it.

In my case my webview had a layout_height="wrap_content", and this height is fine because of positioning inside relative layout, but when targeting sdk 21 webview was reporting 0 height to the page resulting all its elements collapse to 0 height as well. All I did was to change layout_height of the webview to match_parent and I had everything resolved, i hope this helps.

Top comments (0)

Hey 😍

Want to help the DEV Community feel more like a community?

Head over to the Welcome Thread and greet some new community members!

It only takes a minute of your time, and goes a long way!