android - 使用开放天气 API 时如何显示天气图标?
问题描述
我使用开放天气 API 在我的 android 应用程序上显示天气情况,没有问题,但我也想显示天气图标,谁能告诉我我的代码有什么问题?或者我还应该做什么?
iconCode= weatherResponse.getCode();
String iconUrl = "http://openweathermap.org/img/w/" + iconCode + ".png";
Picasso.with(getApplicationContext()).load(iconUrl).into(weatherImage);
解决方案
推荐阅读
- python - Scrapy 正在从不同的网页返回内容
- javascript - 从本地存储中删除时,React list.map 不是函数
- sql-server - 将 pentaho 9.1 连接到 Azure SQL Server
- c++ - 如何在 C++ 中缩短这个简单的数据树算法?
- java - JTextField 从用户获取整数输入以在单击 JButton 时添加
- python - 列表索引超出范围 - 错误从“cmd = tokens[0]”行开始
- python - 如何遍历列表以计算字典中的键?
- java - 关于覆盖等于和递归调用等于的问题
- applescript - Automator 中的 AppleScript 在 Big Sur 中损坏
- amazon-web-services - 如何在 aws-sdk-go 中使用查询选项?