private void init(@NonNull Context context) {
        inflate(getContext(), R.layout.ub__ride_request_view, this);
        webView = (WebView) findViewById(R.id.ub__ride_request_webview);

        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setGeolocationEnabled(true);
        webView.getSettings().setAppCacheEnabled(true);
        webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
        webView.setWebChromeClient(new RideRequestWebChromeClient());
        webView.setWebViewClient(new RideRequestWebViewClient(new RideRequestWebViewClientCallback() {
            @Override
            public void onErrorParsed(@NonNull RideRequestViewError error) {
                if (rideRequestViewCallback != null) {
                    rideRequestViewCallback.onErrorReceived(error);
                }
            }
        }));
    }
private void init(@NonNull Context context) {
        inflate(getContext(), R.layout.ub__ride_request_view, this);
        webView = (WebView) findViewById(R.id.ub__ride_request_webview);

        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setGeolocationEnabled(true);
        webView.getSettings().setAppCacheEnabled(true);
        webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
        webView.setWebChromeClient(new RideRequestWebChromeClient());
        webView.setWebViewClient(new RideRequestWebViewClient(new RideRequestWebViewClientCallback() {
            @Override
            public void onErrorParsed(@NonNull RideRequestViewError error) {
                if (rideRequestViewCallback != null) {
                    rideRequestViewCallback.onErrorReceived(error);
                }
            }
        }));
    }
private void init ( @ NonNull Context context ) { inflate ( getContext ( ) , R . layout . ub__ride_request_view , this ) ; webView = ( WebView ) findViewById ( R . id . ub__ride_request_webview ) ; webView . getSettings ( ) . setJavaScriptEnabled ( true ) ; webView . getSettings ( ) . setGeolocationEnabled ( true ) ; webView . getSettings ( ) . setAppCacheEnabled ( true ) ; webView . getSettings ( ) . setCacheMode ( WebSettings . LOAD_CACHE_ELSE_NETWORK ) ; webView . setWebChromeClient ( new RideRequestWebChromeClient ( ) ) ; webView . setWebViewClient ( new RideRequestWebViewClient ( new RideRequestWebViewClientCallback ( ) { @ Override public void onErrorParsed ( @ NonNull RideRequestViewError error ) { if ( rideRequestViewCallback != null ) { rideRequestViewCallback . onErrorReceived ( error ) ; } } } ) ) ; }
Initialize the layout, properties, and inner web view.
Initialize the layout properties and inner web view .