Welcome back.
Now it's time to set up the right icon for the right coat.
All right.
So let's do that real quick.
So inside of our.
Of why function, I'm just going to add that here, which will be a win statement where I check the
weather list dot whether at the position I for its icon.
All right.
So as this I can object.
And the weather response list here, you can see we get Eichen, which is a string.
All right.
So we don't get an actual I can we just get the string here and here.
I, of course, need to write whether this correctly and then we have the different options.
So let's start with the first one zero one D that's the case.
Then set the Ivy on the score main to you, the image resource r dot drawable dot sunny.
OK, so we have these images here or destroyable.
So it's not really imagists, it's all of those vectors.
And our troubles folder, right cloud, close evening and so forth and all, you have to take the ones
that are relevant, for example, rain, snow, flakes, storm, sunny, sunrise, sunset and so forth,
and then set them here accordingly.
OK, this means that you now need to take those icon codes that we have here and then set the right
resource.
OK.
So please go ahead and try to do that for all of the different codes that we have here.
And by the way, I think 50 days missing, so I don't have an I conformists, so you wouldn't need to
import that as well if you want to have missed in your application as well.
All right, so I hope you tried it.
Basically, that is what I came up with, the sole zero one is sunny, two, three, four is cloud four
and is cloud as well.
Ten days is rain, 20 storm, 13 days, snowflake 01 and is cloud two three.
And it's also cloud 10 and is cloud and 11 is rain.
And then finally 13 is snowflake.
And as I said, I don't really have mist here.
So if you want to add mist in there, then you would have to use the I think it was 50 D or an.
And it's actually 50 degrees with this cloud or dismissed icon.
Now, the question is whether you are allowed to use the icons of this website.
I'm not sure about that.
So that is always something that you need to look at if you just want to use an image right here.
So, for example, if you open up this little mist, I can hear you could see justice, Panji.
And if it's just for your personal projects, you can use it.
But as soon as you make it commercial or as soon as you put it on the store, then you may not use images
that you just find on the Internet.
You have to have the rights for them.
All right.
So I hope you tried this and you were successful.
Now let's test our application, so let's run it again.
And by the way, all of that is, of course, in our set up.
Why function?
Right.
So let's test this.
And of course, I need to get rid of this 50 n, which I just had there for demonstration purposes.
All right, so.
Let's run it again now.
And that loads and as you can see, this icon has changed to the cloud icon.
All right.
Now, at this point, you could, of course, say that this line break here makes the UI a little bit
weird, but in the end, that really depends on how you want to fix things.
You could, of course, fix the size of this.
Card for you here, as well as this one, so that they will always be the same size, but overall I
think the UI is still OK and, you know, you see how you can set everything up for your weather.
Weatherup at this point, you could, of course, say the app is done.
But at the same time, it's not really because we don't have an option to refresh the application.
So that's what we're going to look at in the next video, where we're going to add a little action button
here at the top, which then allows us to basically call the CWI function again, but more importantly,
set up power or run our NQ function once again.
So this last call, which is run when we get that location, weather details, and at the same time,
of course, also our UI is set up there accordingly.
All right.
Because if we look at it, we set up our UI if we had a successful response here.
So, yeah, that's basically what we want to call when we set the refresh button or press the refresh
button.
All right.
So see you in the next video.