Code example for WebView

Methods: getTitle, setEnabled

0
        @Override 
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            super.onPageStarted(view, url, favicon);
            if (getShowsDialog()) {
                getDialog().setTitle(R.string.s_status_loading);
                if (view != null && view.getTitle() != null)
                    getDialog().setTitle(view.getTitle());
            } else if (mTitle != null)
                mTitle.setText(view.getTitle());
            view.setEnabled(false);
            // getDialog().setFeatureDrawable(Window.FEATURE_LEFT_ICON, new 
            // BitmapDrawable(getResources(), favicon)); 
        } 
 
        @Override 
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
            if (getShowsDialog() && getDialog() != null && view != null)
                getDialog().setTitle(view.getTitle());
            else if (mTitle != null && view != null)
                mTitle.setText(view.getTitle());
5
CodeRank