#android
#Android
Вопрос:
кто-нибудь может рассказать, как загрузить тег гиперссылки в webview
Спасибо
Ответ №1:
You are overriding the loading of all URLs by forcing the WebView to load them with this code
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i(TAG, "Loading...");
view.loadUrl(url);
return true;
}
The code would be something like..
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Ответ №2:
Это просто.
Просто создайте свою HTML-строку и загрузите ее в webview с помощью webview.loadData(htmlString, "text/html", "utf-8");
.
Для получения дополнительной информации обратитесь к этому документу Android для WebView.