We'll come back now at this point, we can create cards, so as you've seen, we can create cards which
are then also created inside of a board, of course, which is inside of the task list of that board.
OK, now let's go ahead and display that.
And therefore, we, of course, will need another adapter.
Because if we look at it, this here is where we want to display the cards and they should be in a list
pretty much so we need to recycle you with a adapter.
And we already have the recycler of you in our item task here.
So this one here, you can see we have a result of you called our record list and now we need to give
it an adapter and therefore we will need to create a new adapter here for.
So I'm going to call this one card list items adapter pretty long, but a descriptive name.
So let's go over to our adapters here.
And create another one, you can see we have already multiple ones here create new.
And it's a common Java class and card list items, uh, there.
I hope that was written correctly.
And because we have created so many adapters before, I think it makes sense to just go over this real
quick because it's always the same code pretty much, right.
So we have a constructor here where we pass in the context and the list.
This time it's an array list of cards then we inherit from the respective You adapter.
Then we have a private war on listener if we want to be able to click on one of those card elements
or of those list elements, in our case, we want to do that because we want then added the card later
on.
So, for example, if you want to assign a person to that card or if we want to change the color of
that card or the due date, then we want to be able to click on the card in order to get to the screen
where we can make changes.
Then we will need an item card.
XML file, so we will need to create a little layout for that.
This will be our uncreate view Holder and Unbind View Holder.
We will have a very simple code here.
As you can see, we just have this model.
If the holder is my view holder, then it will use this TV code name text, which we still need to create,
where we then want to put in the name of the card.
That's pretty much it.
So then get item count as always, said Unclick Listener, as well as the unclick.
There's an interface and the might be holder, which we have used multiple times before.
All right, so now what is left is, of course, to create the UI elements.
So let's go ahead and create a new.
XML file and all resources here.
So you lay out and I'm going to call this one.
Item on the score.
Kaat.
OK, so let's create it.
Then let's go over to the court now.
What do we want to do here?
Well, it's just a cart view which has a name in it.
That's pretty much it.
Very, very basic.
Not too much stuff, maybe a line in there and some more text depending on what we want to display.
So I'm just going to paste that in here.
And show you what it's all about, because we have worked with XHTML so many times already, so you
can see this is really just repetition.
You could have tried to build all of that yourself, of course.
So I'm using a Kadafi here.
We will need some more dimensions.
So let's add those directly so that the arrows disappear and we can then look at it in the ed.
So here, let's go to values and add a bunch of new dimensions.
So item card content margin c.v elevation, which is the Carthew elevation label height takes padding
and so forth.
OK, now we can go over to our item card now the error should disappear.
So basically we have a card for you, right, with a little bit of elevation.
The orientation is vertical.
It has a certain margin, selectable item background.
And then inside of that, we have a linear layout with a view, which is just a line.
And then.
Concedes the color accent here, this is the.
Blue line, so to speak, then we have text views, so two of them, one is for the card name and then
for the member's name.
So if we later on add some more or once we add some more people to it, we will also see that there
are multiple people assigned to that card.
OK, so that is what we decide or design here.
All right.
So that's the member's name.
OK, so this is the UI that we will use, we have created the adapter now we need to make sure that
names are correct here, TV underscore.
Cards.
Name now that accepts it this time, the item card layout is fine for that as well.
All right.
And now, of course, we need to go to our task list adapter because that's where we load the cards.
So we need to load the cards.
And where would we do that?
Well, I'd say we loaded inside of our function on Binde View Holder.
All right.
So here, once we bind it with this huge function where we have all of this code.
Right.
And then at the very bottom.
Just outside this last I hold the item view, I be done, said Unclick Listener here, we can go ahead
and prepare our next item.
You so item view dot, are we on the scorecard list that layout manager.
So what is this RV cart list?
Well, it's this one here, right?
So this card list that we have in our item task.
And here, the layout manager should be a linear layout manager.
Which needs a context as well, so here, let's add a context.
Context.
All right, so that's our linear layout manager, so we prepared it, we make a linear layout manager
of it, then I'm going to fix the size.
So Holder.
Item view that our V card lists.
Port Said has fixed size the true.
And then we can assign the adapter, so basically the same stuff that we have done multiple times when
we work with adapters and I think we have done it here somewhere at the top as well.
Actually, that was in the in the other class.
But here we can now go ahead and say Volle adapter is the card list items adapter.
Here, we need to pass in the context.
And the model that we want to use, which is in this case, of course, our model, but Cartes.
OK, so we want to pass in the cards.
And then we can assign that adapter to our.
Regardless, all right, so.
Let's just do that thought adaptor is going to be the adapter we prepared.
All right, so now our adapter is ready, our our record list is ready and let's see if it actually
works and displays everything as we expected.
All right, so that we have our beautiful project ménage.
There we are.
And let's wait for the boards to load.
Now let's go to board with image and we can see car one is there.
Now let's go ahead and create another cart.
So your card.
To.
And Kartu is there as well.
Now create card three.
Perfect.
OK, so now you can see how we can create cars, of course, we cannot drag them yet.
This is a super cool feature that we want to have.
Then we cannot open them yet, but we will be able to later on, click on them and then make changes
to that card.
For example, assign a user, then assign a date, so a due date and so forth.
All right, so that's it for this video.
See you the next one.