Welcome back.
The next thing I want to add to our app is the following so you can see here upcoming exercise jumping
jacks.
So it displays the following exercise and that is something that you can actually build yourself.
So you can already go ahead and try to build that you will need to do a little bit of coding in the
exercise activity.
And you will also need to add a little bit of something to the XML file.
So do the activity exercise XML file.
So if you want, you can post a video now and try to implement that feature and otherwise you can of
course, follow along.
All right, so let's get started in order to add this functionality, we need to have an extra field
in our activity exercise XML.
So we had this linear layout, this bigger linear layout where there are two of them, of course, but
this one where we had the text for our rescue.
So the linear allowed a view.
We had to text you where we have get ready for it and we have the frame layout which displays our timer
and then underneath that frame layout, that's where we can add our text views.
So one of them was get ready for or upcoming exercise.
This one here and the other one was jumping jacks.
So upcoming exercise is hard coded text, but then jumping jacks is the one that we want to adjust accordingly.
So underneath the frame layout and before the end of the linear layout, we can add the two textures
and I'm just going to place them in here and talk about them real quick.
So.
The first one is thanks to you, and you can see here Web content or content, 20 deep and which is
the masterpiece of a little distance towards the top.
Then we have this text, upcoming exercise and we have 16 Espie as a text size.
All right.
Nothing too crazy here.
And then we have this text view, which is the TV upcoming exercise name.
So that's how I call it.
Of course, you can have a different name here.
But the idea behind it is that we want to actively manipulate this text you in our code.
And if you want to do that, we need an ad for that.
The content is the case for weight and HitIer margin.
Well, I have a little less distance because those two, they should be closer together, so to say.
Then we have this color here and of course you can use a different color.
I'm using a rather black color here.
I'm using a hardcoded one.
But of course you can also use a color from add colors and then the accent color or something like that.
Well, that's probably not color primary.
I think that was a dark color here as well.
So you could use the color primary here, then the text size 22 and textile is bold and then the tools
text is exercise name.
So this means that if you want to know the name of it, you can see here exercise name is the tools
text that we can still see in here.
All right.
So now the next thing we need to add is in our exercise activity, we need to set the text.
So we need to set this TV upcoming exercise name in the rest of you.
And what would be a good spot to do that?
Well, I'd say in our set up rescue function, because we have this function here, set up rescue where
we sit sitarist rest progress bar.
But we can also just go ahead and set the other stuff.
For example, our TV upcoming exercise name.
That text, and we can simply sell it as the exercise list.
Exclamation mark twice, because it's a nullable and then the current exercise position that we're at
plus one Y plus one, well, because the current exercise position before we actually get to our exercise
is at zero, actually at minus one even.
So, let's see where we had that.
So at the very top, we said it as minus one.
Right.
And then if we look at our current exercise position, we can see that on Finnish we increase it by
one.
So that's when our progress bar is finished, which means that as soon as our screen is finished, only
then we increase the current exercise position by one.
So that means that in the rest screen itself, it will not be a plus one, but it will be or increased
by one, but it will be at minus one.
So if we want to get the zeroth position so pretty much the first position, then we need to go ahead
and increase this by one.
All right.
And of course, we need to get the name of that exercise.
That's what we want it right.
So that get name before we go ahead and test that, there's one little thing that we need to change.
So we need to change the order of setting our exercise list and setting up the rest of you because we
use the exercise list within the rest of you.
That's why it's important to change the order, because otherwise we have no pointer exception.
So that's something that we need to take into consideration.
All right.
So once we have that, we can check if that all is going to work and it should, because we can then
directly see the exercise names here.
So that we are let's start this.
And.
Let's wait until install is done.
Right, and we can see upcoming exercise jumping jacks.
All right, so that works.
Now, of course, we can check if that also works in the next exercise.
So I'm going to post a video until this time is done.
And that we are so.
Upcoming exercises will sit.
Let's see if it's actually true.
So the next exercise is going to be was it and we are here.
It is also great.
So that seems to work.
So I'd say, let's go to the next video where we're going to extend our little seven minute workout.
So.
So you there.