mardi 10 avril 2018

if statement with picasso

I'm really, really new to android studio and i'm trying out some stuff. I've made a weather app, but now i want to get images from the web using picasso and i want to have a different icon, depending on the weather. I wanted to try out with a single if statement if my idea is ok, but i get no image when i load the app. With weather.currentCondition.getCondition() i'm getting the current weather condition and in my case let's say that it's clouds. Do you know where my mistake is?

if (weather.currentCondition.getCondition() == "Clouds");{
                Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(iconView);
        }

Aucun commentaire:

Enregistrer un commentaire