private void createWebView() {
   mWebView = new WebView(this);
   mWebView.setInitialScale(300);
   mWebView.measure(800, 1280);
   mWebView.layout(0, 0, 800, 1280);
   WebSettings webSettings = mWebView.getSettings();
   webSettings.setJavaScriptEnabled(false);
   mWebView.setBackgroundColor(0xff202020);
 }
Exemplo n.º 2
0
 protected void onLayout(
     boolean paramBoolean, int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
   int i = paramInt3 - paramInt1;
   int j = paramInt4 - paramInt2;
   this.standardLayout.scaleToBounds(i, j);
   this.webviewLayout.scaleToBounds(this.standardLayout);
   webView.layout(
       this.webviewLayout.getLeft(),
       this.webviewLayout.getTop(),
       this.webviewLayout.getRight(),
       this.webviewLayout.getBottom());
 }
Exemplo n.º 3
0
 @Override
 protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
   webView.layout(left, top, right, bottom);
 }