Code example for WebView

Methods: requestFocus, setVisibility

0
            runOnUiThread(new Runnable() {
                public void run() { 
                    if (visibility) { 
                        // Show and set focus. 
                        mWebView.setVisibility(View.VISIBLE);
                        mWebView.requestFocus();
                    } else { 
                        // Hide. 
                        mWebView.setVisibility(View.GONE);
                    } 
                } 
            }); 
        } 
    } 
 
    public String pollWebViewMessage() {
        return mJSInterface.mMessageQueue.poll();
    } 
     
    // Transparent background 
    public void makeTransparentWebViewBackground() {