Welcome back.
And this video, we are going to design every single item here, so the member, we're going to design
something for it.
So an example file and we will also pass in the information about the board to this activity, an intent
so that we can also display something and the toolbar.
OK, so let's get started.
So the first thing that I want to do is I want to create the new constants in my.
Constance file here in utils.
So the consent should be the one that we use in order to pass information over to.
The other activity.
OK, so the two hour remember activity and I'm just going to call this one concert volume bought on
the record detail, which will be a string.
And I'm going to.
Assigned text of board detail to it.
All right, so that's our boarded up, then the next step is to pass details through the intent and
that detail that we want to pass comes from the task list activity.
OK, so here, when we are in on options items selected, we.
Click on this action numbers, right, and here we start in activity, but I would also like to have
some more details here.
So let's now go ahead and create this intent separately.
So here.
Full intent will be this intent, and then I want to put some extra details to the intent.
So that's always the same approach, right?
Intent to put extra and then at the position of Constance.
Thought work detail is where I want to pass in the more details, so our board details board and this
of course only works because our board tails is a tie board and our board is a part syllable.
OK, so we are passing a whole object because it's made to a string, so to speak.
So it's transferred to a string so that we can put that as extra information there.
OK, so.
And has this activity.
We now have this intent, we put it as extra information, and then we can start this intent.
All right.
And in our members activity now, we can catch it.
All right, so we, of course, need to get the value somewhere and store it somewhere.
So I'm just going to.
Created late in it again, as we've done so late in advance, and this one will also be called on board
details, which will also be a board object.
All right.
So we need to import board, of course, because this class doesn't know about board and then we can
initialize it and we can initialize it in our own create and only if the intent has some extra information.
So if the intent has extra four constants, that board detail.
So that's the concept that we just created.
Right.
Which is just words on the details.
So if at that position there are some extra information, then use those information to store them in
more details.
So this is basically just passing information from one screen to another.
But this time we're not just getting a string or something like that, but we're getting pasodoble extra.
You could see here intent get Pozible extra and then we, of course, need to say what we want to have
and that's constants.
That board detail.
Now, you can add.
Something like this here where you say of which type it will be specifically.
OK, so the possible extra information will be of type and then it will put that into the and details.
Now we can go ahead and set up the toolbar and I will do it the same way as I have done in multiple
other activities, and I think it makes sense to go to the main activity to get it from there.
Because we've done it so many times, right, and let's just reuse it if we can.
So set up action bar.
Actually, I don't like this one.
I prefer the one from my profile activity, so in my profile activity, we set up this action bar,
right.
And I want to use the same here in my member's activity.
Only with some adjustments, of course, so here, set up action bar should be for toolbar.
On the score and it's in the members activity or it's called to bar members activity, so it's this
toolbar here that we created in this XML file earlier on.
Right.
So it's this ID.
We just copied it, actually.
We didn't really create it, but, yeah, we created at one point and then with the action bar we check
if it's now, if it's not, and then as the drawable I use to beg pardon, and here we could set a title.
Or we could leave it.
Well, we could use members here, right?
Which is this one, so if you want to set a title, that's how you can do it, of course we will see
if that looks good or not, then, of course, we have to be careful that we don't use a toolbar from
another activity because this definitely will cause a crash.
So if you ever do that, it will cause a crash and you will see that it's not going to work.
All right.
So you have to use the toolbar that is available, of course, in this member's activity, which is
the one inside of this layout called activity members.
OK, then at this point, we can now go ahead and set the navigation unclick lisner, which will just
do a big press.
And of course, we may not forget to also add that here in the uncreate.
So.
Set up action bar, we need to call this function at one point, of course.
Now, the next thing would be to design the member items, right, so let's just do that.
Let's go ahead and create a new layout.
And here you lay out a file and I'm going to call this one item on the score member, so this one is
going to take care of every single member or every individual member.
And the code here is going to be a linear layout.
So you can just download the code once again and I will walk you through it real quick.
Of course, we will need some new dimensions so you can also download the dimensions file.
I just think that at this point the project is already long enough that I don't want to bore you with
entering everything here.
So you can see with a bunch of dimensions, just download the updated dimensions file for this project.
You can find it assigned to this video.
And then let's look at item member.
So it's basically what you can see here.
So we have this icon here or this image, then the member name and the email address.
All right, so it's a linear layout, vertically oriented with another linear layout, horizontally
oriented, which we have the circular image view and then we have the linear layout inside of it, which
is vertical again, where we have the two textures on top of each other, and then we have a little
separator, which is this view here.
Or it's a divider, so to speak.
OK, so then it will look like what you see here where we have the member name, email address and then
a little divider here at the bottom so that we can see where one starts and the other ends or the other
way around.
All right.
So that is it for this video.
In the next video, we are going to add the code that allows us to, of course, display the data in
the member's activity.
OK, so see you there.