字符串转换为开放的我们字符串、转换为

2023-09-12 11:03:58 作者:霹雳惊天雷声动

我如何将字符串转换为一个开放的Java中(安卓)?即:

How can I convert a String to a Uri in Java (Android)? i.e.:

String myUrl = "http://stackoverflow.com";

myUri = ???;

推荐答案

可以从乌里

You can use the parse static method from Uri

Uri myUri = Uri.parse("http://stackoverflow.com")