Code example for WebSettings

Methods: getUserAgentString, setJavaScriptEnabled, setUserAgentString

0
 
        //The topmost layout of the window where the actual VideoView will be added to 
        mRootLayout = (FrameLayout) ((Activity) getContext()).getWindow().getDecorView();
 
        mWebSettings = getSettings();
        mWebSettings.setJavaScriptEnabled(true);
        mWebSettings.setUserAgentString(mWebSettings.getUserAgentString() + mExtraUA);
 
        mChromeClient = new WebChromeClient(){
 
            /** 
             * The view to be displayed while the fullscreen VideoView is buffering 
             * @return the progress view 
             */ 
            @Override 
            public View getVideoLoadingProgressView() {
                ProgressBar pb = new ProgressBar(getContext());
                pb.setIndeterminate(true);
                return pb;
            }