0

I have this code where it does not work:

if (desctiption == "net :: ERR_INVALID_ARGUMENT" ") 

instead if I write

if (desctiption! =" Net :: ERR_INVALID_ARGUMENT "") 

I create the Toast object and the text is equal to

net: : ERR_INVALID_ARGUMENT

The code:

webView.setWebViewClient(new WebViewClient() {


        @Override
        public void onReceivedError(WebView view, int errorCode,
                                    String description, String failingUrl) {
            super.onReceivedError(view, errorCode, description, failingUrl);


            Toast toast = Toast.makeText(getBaseContext(),description, Toast.LENGTH_LONG);

            if (description == "net::ERR_INVALID_ARGUMENT"){
            toast.show();}



        }


    });
}
Graham
  • 7,431
  • 18
  • 59
  • 84

0 Answers0