Add http://www. in the text if not Exist

前端 未结 6 626
迷失自我
迷失自我 2021-02-08 21:31

How can I know that some text contain \"http://www.\" I want to show domain in Web View. Domain name is written in TextView but there is no restriction to add prefix. If user di

6条回答
  •  囚心锁ツ
    2021-02-08 21:59

    Try this

    String a = "http://";
    webview.loadUrl(a + url.getText().toString());
    

提交回复
热议问题