android-slidingactivity
android-slidingactivity copied to clipboard
WebView inside FabActivity
I've a webview inside the sliding activity, Initially I had height problems, since the height isn't fixed as I've set the height and width of webview to fill_parent in xml I used the code below to solve this,
private void setupWebView() {
webView = (WebView) findViewById(R.id.webview);
webView.loadUrl(mAsset);
webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
final int height = webView.getMeasuredHeight();
webView.setMinimumHeight(height);
super.onPageFinished(view, url);
}
});
}
Note: I'm using offline html files for the webview
This solution works perfectly. but sometimes when the activity is called, the webview isn't scrollable this happens only sometimes and I wanna avoid it, Please help me with this
PS: I have ads in the page too, it mostly happens when the ads are being loaded at activity call When no ads are downloaded everything runs smooth
I think you can just comment the onInterceptTouchEvent
in class MultiShrinkScroller
to do some test, maybe it helps.