I Make application using WebView to load a JSP page which conation a DHTML grid. My problem is when we scroll this grid in web view With approx 100 rows My app hang, Memory goes up and show ANR report, but if we scroll with 20 to 30 rows its working fine. Please suggest me that what we do wrong. This is a JSP error or my application error.
web_view = (WebView) findViewById(R.id.web_view);
WebSettings settings = web_view.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE))
{ WebView.setWebContentsDebuggingEnabled(true); }
}
web_view.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
public void onPageFinished(WebView view, String url) {
}
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
}
});
web_view.loadUrl("http://192.168.x.xyz:1212/grid.jsp?");
Below is error which prints in log cat
08-29 11:20:56.654 2188-2193/com.honeywell.raesystems.proraeguardianviewer I/art: Do partial code cache collection, code=39KB, data=62KB
08-29 11:20:56.656 2188-2193/com.honeywell.raesystems.proraeguardianviewer I/art: After code cache collection, code=39KB, data=62KB
08-29 11:20:56.656 2188-2193/com.honeywell.raesystems.proraeguardianviewer I/art: Increasing code cache capacity to 256KB
08-29 11:21:02.078 2188-2188/com.honeywell.raesystems.proraeguardianviewer I/Choreographer: Skipped 69 frames! The application may be doing too much work on its main thread.
08-29 11:21:02.382 2188-2188/com.honeywell.raesystems.proraeguardianviewer I/chromium: [INFO:CONSOLE(93)] "Uncaught TypeError: Cannot read property 'scrollLeft' of undefined", source: http://192.168.x.xyz:1212//dhtml/dhtmlxGrid/codebase/dhtmlxgrid.js (93)