Welcome back.
And this year, we are going to add the respect of you to our activity exercise XHTML, and that is
going to be a list of elements that we want to display.
There was something called List View in the past which allowed us to create a list of elements that
were displayed in a vertical manner.
But what we want to do is we want to display the lowest elements in the horizontal manner, and in order
to do so, we cannot use list view, which is a deprecated version of a list, but we will need to use
the risk of you.
So let's create a recycle of you.
And that should be displayed at the very bottom of our activity exercise.
So just before this relative layout ends and I'm just going to sit it in here and you might have to
add the dependancy so you might get an error here because it doesn't know recycle you.
So you need to add the dependancy in your cradle will update for this.
But after that, you should be able to use recycled of here in your XML files.
So it gets an ID, which is arvi exercise status.
Are we standing for recycling view?
And it's just going to have the status which can have three states, so to speak, finished, ongoing
or not started yet.
So these are the three different.
States, so to speak, and it's going to wrap its content, so it's just going to display a small element
in there, which is going to be a number that within a circle.
Now, let's go ahead and design such a little circle in order to do so, we need to go to our layout.
And here I'm going to create a new resus file and I'm going to call this one item on the score exercise
status.
And what it should have as its root element.
It's going to be a text you.
All right, so that we are so within this TextView, I want to have certain settings, all right, so
I'm going to change the settings up here a little bit.
So, first of all, I'm going to give it an ID because I want to access it.
And the idea is going to be a TV item, so TextView item.
And then I said the layout with not much apparent, but it's just going to be twenty five density pixels
and to also be twenty five density pixels, then I want to have a little margin here.
So I'm going to give it a margin towards all directions of one density pixel, then I want it to be
centered.
So I'm going to say gravity center.
As the text color, I will said a rather dark color.
So twenty one, twenty one, which is this black ish color.
And as the text size, I'm going to set it as 14 Aspey and the textile will be bold.
So then there is one little thing I'm going to add the tools text to be one, so in the tools that should
display the text is one.
So we need to import tools here.
All right.
There we are.
Now, there's one more thing that is missing are actually two, one is padding one to have a little
bit of padding so that the text has enough space inside of the circle.
And then, of course, in order to make this thing a circle, this texture, because for now it's just
a text.
You're right.
But I want to give it a background.
And in order to give you the background, I need to prepare another file.
And I'm going to do that in the Dropbox folder.
So I'm going to create a new drawable resource, which I'm going to call Hatam circular color.
Ray.
Background.
And as the root element, that's going to have a shape.
All right, so very similar to what we have created before.
I just want this to have a shape.
Of and that should go in here.
Shape oval, and then I need to.
I have a solid color.
As its background, so to say, so I'm going to use C for C for C for for this.
All right.
So this is just going to be the background, this grey background.
And now we can go ahead and use this as the background for our item exercise status and we call the
color ray.
So item color gray.
So Grayback want this one.
Pretty long name, but you can see this is how it's going to look, so it's going to be a circle.
And now if we look at this here and the design.
I can see that it's this little.
Circle here does Quraish Circle.
With the one in there, all right, so that's just a preparation, we don't do anything in code yet,
only XML so far, that's just a preparation and we want to have 12 of those next to each other.
So one, two, three, four and so forth.
And it will be all next to each other and it should be displayed on the bottom of the screen of our
activity exercise.
Xome also here at the bottom, we want to have it within our recycler view that I have had it in here.
As you can see, it's at the very bottom right now and not very happy where it is.
But we will adjust it later on once we get to the point.
OK, so that was just a little preparation.
I didn't want to drag this out.
And we will need to have multiple videos in order to really get something on the screen that is cool
and works as we want it, because even though this is a rather small feature that doesn't add extreme
value, so to speak, but it's an important feature nonetheless, because the user needs to know which
exercise he currently is out of how many, and of course, could make it simple and just display a number
and say you are at exercise one out of 12.
But having 12 little circles there at the bottom is more visual and a lot cooler, too, to look at.
So that's what we're going to build.
So see you in the next video.