Code example for WebView

Methods: getSettingssetWebViewClient

1
 
    private GoogleAccountLogin(Activity activity, Account account,
            Runnable runnable) {
        mActivity = activity;
        mAccount = account;
        mWebView = new WebView(mActivity);
        mRunnable = runnable;
        mUserAgent = mWebView.getSettings().getUserAgentString();
 
        // XXX: Doing pre-login causes onResume to skip calling 
        // resumeWebViewTimers. So to avoid problems with timers not running, we 
        // duplicate the work here using the off-screen WebView. 
        CookieSyncManager.getInstance().startSync();
        WebViewTimersControl.getInstance().onBrowserActivityResume(mWebView);
 
        mWebView.setWebViewClient(new WebViewClient() {
            @Override 
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                return false; 
            } 
            @Override 
Connect your IDE to all the code out there  Get Codota for Java