【问题标题】:How to use getUrl() in Chrome custom tabs如何在 Chrome 自定义标签中使用 getUrl()
【发布时间】:2018-11-22 16:28:45
【问题描述】:

我正在使用 chrome 自定义标签(webview),但 getUrl() 和 getTitle() 功能不起作用。这个怎么做?

 final CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();
                intentBuilder.setToolbarColor(ContextCompat.getColor(getActivity(), R.color.colorPrimary));
                intentBuilder.setShowTitle(false);
                //intentBuilder.setSecondaryToolbarColor(ContextCompat.getColor(getActivity(), R.color.colorPrimaryDark));
                intentBuilder.setExitAnimations(getActivity(), android.R.anim.slide_in_left, android.R.anim.slide_out_right);
                CustomTabsIntent customTabsIntent = intentBuilder.build();
                customTabsIntent.launchUrl(getActivity(), Uri.parse(urll));

【问题讨论】:

    标签: android android-fragments webview


    【解决方案1】:

    网址应该是这样的“https://www.google.co/”在网址前加了https

    【讨论】:

    • 我不懂你
    • 能否请您检查您传递的网址
    猜你喜欢
    • 2020-07-14
    • 2012-07-13
    • 1970-01-01
    • 2017-02-27
    • 1970-01-01
    • 2016-01-08
    • 2014-09-03
    • 1970-01-01
    • 2016-04-22
    相关资源
    最近更新 更多