我有一个 WebView。它包含页面,由 Jsoup 过滤。
WebView cntContent;
WebView cntComments;
WebSettings webSettingsContent;
WebSettings webSettingsComments;
cntContent = findViewById(R.id.cntContent);
cntComments = findViewById(R.id.cntComments);
webSettingsContent = cntContent.getSettings();
webSettingsComments = cntComments.getSettings();
webSettingsContent.setDefaultFontSize(16);
webSettingsComments.setDefaultFontSize(16);
cntContent.setBackgroundColor(Color.TRANSPARENT);
cntComments.setBackgroundColor(Color.TRANSPARENT);
webSettingsContent.setAppCacheEnabled(true);
webSettingsComments.setAppCacheEnabled(true);
cntContent.loadDataWithBaseURL(contentUrl, contentFinal, "text/html", "utf-8", null);
cntComments.loadDataWithBaseURL(contentUrl, commentsFinal, "text/html", "utf-8", null);
cntContent.setClickable(true);
页面包含链接。当用户单击链接并将 url 放入字符串时,如何提供链接的 url?
慕慕森
相关分类