Code example for WebChromeClient

Methods: onHideCustomView

0
        mContentView.addView(this);
    } 
 
    public FrameLayout getLayout() { return mLayout; }
    public boolean inCustomView() { return mCustomView != null; }
    public void hideCustomView() { mWebChromeClient.onHideCustomView(); }
 
    private class ArticleWebChromeClient extends WebChromeClient {
 
        @Override 
        public void onHideCustomView() { 
            if (!inCustomView()) return; 
            ((SherlockFragmentActivity) mContext).getSupportActionBar().hide();
            if(Build.VERSION.SDK_INT > 11) showUI();
            mCustomView.setVisibility(View.GONE);
            mCustomViewContainer.removeView(mCustomView);
            mCustomView = null;
            mCustomViewContainer.setVisibility(View.GONE);
            mCustomViewCallback.onCustomViewHidden();
 
            ArticleWebView.this.setVisibility(View.VISIBLE);