Welcome back.
Now let's go ahead and take care of setting this screen up, or at least parts of it, so we are going
to start with just getting the title here at the top.
So we want to get the card name here at the very top.
So let's get started with this.
OK, so let's go into our card list, details activity.
And here we are going to set up the action bar.
So it's going to be the same thing as we have done multiple times already, for example.
And the members activities or just copy this function, we're going to use a very similar one or we're
just going to adjust it a little bit.
So set up action bar here.
We, of course, want to use toolbar on the score card.
Details activity, this one, and we want to make sure that we added it here at the bottom as well.
The rest stays the same, except for, of course, the title, because we want to get the title dynamically.
All right, the rest can stay the same.
So we get the support action bar we have and home is up indicator, which is the back button.
And we have the on back press functionality.
So very similar to what we've done before.
And then we can, of course, call this function inside of our own create so that it will be displayed.
OK, so that's step number one then.
What we need is we need to know the details about the position of the card as well as the position of
the task list.
OK, we looked at this in the last video.
So, for example, we need to know which card we clicked on.
Therefore, we need to know which tasks list we are and then the position of the card itself.
And in order to get this information, we can pass it from this activity, so from this board's detailed
activity to the court detail activity.
All right.
So let's, first of all, create a concern because we need to get those values via an intent.
And if we put extra information, it's always good to have a key which is easily identifiable and unique.
OK, so we can, of course, go ahead and use the constants.
Therefore, so here are constants variable and I'm just going to work or class and I'm just going to
use the two constants, which will be constant.
All task list, item position.
Which will be a string which says task list, item position.
All right, so.
This is number one, and then we have another one, which will be called.
List item position.
And that one will be the same thing pretty much so year.
Let's replace this with a card list item position.
OK, so these are the two strings that we are going to use whenever we use the intense and that's what
we need to look at inside of our task list activity.
OK, so here we have this function, which we called card details.
OK, so here we start the activity with the intent, but now it makes sense to have an extra variable
intent, which we can then modify.
OK, so we're just going to say let's create a new intent, then let's put extra information to this
intent.
So put extra at the position constants that for detail.
And here.
We want to send over the whole board details object, so if you look at it, it's the board that we're
currently at.
So that's step number one or the first information that we pass.
And then we, of course, need to know the task, this position, as well as the card position.
OK, so here intent put extra.
Constance thought.
Task list item position.
And what we pass here?
Well, our task, this position, so this variable that we get from countless details, once it's called,
it's called, and then we do the same thing with that next line, which is the hardest position, hottest
item position.
OK, so here.
Here is the card list IETA position.
And then it's the.
Card position.
All right.
And this in turn that we prepared now is what we can send over with this activity.
Now, of course, we want to get this information, so we want to get the information from the intent
in our car, details activity, and I'm going to create global variables, which we will use in order
to then get those details.
OK, so here private let in.
It will be our embassy details.
Which will be a board object, because, as you recall, we sent this information over here, we sent
the whole board over.
And then the next thing is our task this session, and I'm going to use private var and task list position.
Which will be.
Minus one, so that's number one.
And then private bar and card position, which I'm also going to set to minus one, because if I set
them to minus one, I know that I don't have the real values because they cannot be minus one.
They always have to be positive.
Right.
OK, now we need to get the intent data and therefore we can set up a new function.
So private phone, get Internet data.
Here, we just checked the intent, if that has some extra information, so it has extra, for example,
Constance thought or details, so if it has the details, then I want to assign those two and details.
So here, intent get passed a little extra called Constance thought 42.
All right, and then we can do another check, so here, if the intent has extra at the position, Constance.
But.
Carlist position or Eitam position, I think let's start with this one, if that's the case, then I
signed the.
Passivist position, so we call this task, this position with the intent to get into extra.
At the position, Constance, that passed this Diatta position.
And he can assign a default value, so if we get nothing, well, then let's use the default value of
minus one.
All right, so here I am using default value minus one.
So maybe it makes sense to put that into two lines and now we do the same thing once again here.
With the cart list item position.
So we can just say.
Cardless Eitam position.
Should be my card list item or card position, it's how we call it, that's it.
So now we have those checks here where we get, first of all, the board details.
Then we get the task list item position and then the card list item position.
All right, now we can get the Internet data in our uncreate function.
So here, get Internet data, and now we can use that, get Internet data inside of our set up action
bar.
Not the function itself, but whatever word results, because now we have the details and we want to
specifically load the title.
So here, Action Bar, that title should be our more details.
Fastest at the position of our task list position.
And then.
The cards name, so cards at the ATM card position.
That name.
OK, so basically we say.
The more details that you have passed to me, check out the task list and then check out the card.
In that position and give me the name of it.
So if we look at our words here, for example, this board here has a task list.
All right, so here it has this.
It has multiple entries.
So, for example, it has this at position zero has cards.
For example, the card at position zero will be card one, which says well, which currently has just
a name, card one, which is created by a specific user.
OK.
So that is what we basically want to work with.
All right, and at that point, we should get the name once we click on any of the cards.
All right.
So should at least get the name in the title here at the top.
Of course, we want to get a lot more information, but that's what we'll have to do afterwards.
So, first of all, let's do that.
Let's go to board with image.
Let's click on card one.
And we can see here at the top card one is, in fact, there.
Let's test this with Kartu as well.
We can see Kartu is there and called three to see if it wasn't chance.
It's right there as well.
So let's create a random name here as well.
Random name.
And let's open this one and we can see random names up there as well.
OK, so that seems to work.
That means that we get the card now, because if we look at it, we can see that.
Here we get the whole card, so we cannot just get the name, we could get anything from the card created
by, assigned to and so forth, so now we can, of course, make adjustments.
Now, card is of type card, and here we will, of course, need to also make changes because we currently
don't have any details about the color.
Neither do we have details about the due date and so forth.
All right.
I'll see you in the next video where we're going to adjust things step by step.