【问题标题】:Open rss item in webview在 webview 中打开 rss 项目
【发布时间】:2015-01-29 13:38:18
【问题描述】:

我正在制作获取 rss 的 android rss 阅读器应用程序,解析然后在 listView 中显示项目 现在使用我的代码,当单击项目时,它会打开默认浏览器显示 rss

我想在 webview 的另一个活动中展示这一点

那我该怎么做呢?

这是我的代码

public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {     Intent i = new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse(listItems.get(pos).getLink()))  ;

    activity.startActivity(i);

}

【问题讨论】:

    标签: android rss android-webview rss-reader


    【解决方案1】:

    使用 webview 编写另一个 Activity,并在启动新 Activity 之前在 Intent 数据中传递您需要打开的 url。

    新 Activity 将从 Intent 中读取 url,然后将其加载到 webview 中

    您需要什么样的帮助才能完成这项工作?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-17
    • 2022-01-16
    • 2014-08-19
    • 1970-01-01
    相关资源
    最近更新 更多