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.

Latest comments (1)

Collapse
 
yanabice profile image
Yana Chernova

thanks, ive been fighting with it like for 3 days! thats exactly what i needed XD <3