I am a beginner in Android and building a linear layout
and getting an error in the layout XML file like this,
Error
Placi
Contrary to what most answers imply, this is not a bug in Eclipse resp. Android Studio, but a fair warning. It's produced by a LINT check on your layout.
You can remove the warning and work around the 'subtile bugs' like so:
tools:ignore="WebViewLayout"
to your WebView (thanks to @StefanDeitmar) and make the tools namespace known by adding xmlns:tools="http://schemas.android.com/tools"
to your outmost layout element.OnPageFinished()
callback to invoke a requestLayout()
on your wrapping layout element.mWebView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView webView, String url) {
super.onPageFinished(webView, url);
mSurroundingLayout.requestLayout();
}
}