0

When I click a button to connect with a URL,the webview show NOTHING but jumped to the device's browser,I added use-permission.

Here is my code:

btn_go.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            final String urlString = et_inputURL.getText().toString();
            if (urlString.startsWith("http://")) {
                webView.loadUrl(urlString);
            } else {
                webView.loadUrl("http://" + urlString);
            }

        }
    });
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.