[英]What kind of View should I use so to get the Title and the Url of a WebView like in the image below?
[英]I want to open a url using inbuilt Android system web view like the below image
要在 webview 中打开一个 url,只需将 WebView 添加到您的 xml 中。 然后这样做。
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.google.com");
不过,您上面的图像是 chromecustomtab。 所以要做到这一点,你想把它添加到你的应用程序级 build.gradle
compile 'com.android.support:customtabs:23.3.0'
然后打开一个这样的网址:
String url = ¨https://paul.kinlan.me/¨;
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(url));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.