How to get URL from String on Android

后端 未结 3 1169
野的像风
野的像风 2021-01-07 12:37

I\'d like to extract URL from hi there this is a URL String http://mytest.com.

I tried to use EditText.getURLs but it didn\'t work for me.



        
3条回答
  •  一个人的身影
    2021-01-07 13:24

    change input type of your EditText ---- android:inputType="textUri"

    and get your url using --- String url=edittext.getText().toString();

提交回复
热议问题