Code example for WebResourceResponse

0
            	return getUtf8EncodedCssWebResourceResponse(ArtBookUtils.changeWidthAndHeight(BookRootLayout.this.getContext(),"book.css",width,height));
    			//return getUtf8EncodedCssWebResourceResponse(ArtBookUtils.getNativeFile(Environment.getExternalStorageDirectory() + File.separator+"book.css",width,height)); 
    		} 
             
    		 private WebResourceResponse getUtf8EncodedCssWebResourceResponse(InputStream data) {
    	        return new WebResourceResponse("text/css", "UTF-8", data);
    	     } 
 
        }); 
        Log.e("ArtBook", "display.getWidth()"+display.getWidth()+":display.getHeight()"+display.getHeight());
         
        webView.addJavascriptInterface(new PageCountJavaScriptInterface(), "artbook");
 
        webView.setHorizontalScrollBarEnabled(false);
 
        webView.loadUrl("file:///android_asset/1900-1901.html");
         
      
        this.webViewLayout.addView(webView);
        this.addView(this.webViewLayout);
    }