首页 > 解决方案 > 使用开放天气 API 时如何显示天气图标?

问题描述

我使用开放天气 API 在我的 android 应用程序上显示天气情况,没有问题,但我也想显示天气图标,谁能告诉我我的代码有什么问题?或者我还应该做什么?

iconCode= weatherResponse.getCode();
String iconUrl = "http://openweathermap.org/img/w/" + iconCode + ".png";
Picasso.with(getApplicationContext()).load(iconUrl).into(weatherImage);

标签: androidweb-servicesweather-apiopenweathermap

解决方案


推荐阅读