我有一個 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?
當用戶單擊它時如何從 WebView 內的鏈接提供 url
慕無忌1623718
2021-10-20 11:24:33