We'll come back and this would be a we are going to add the functionality that you see here, so the
settings at the top where you can then go to members and then here currently we don't see anything,
but we want to also be able to add members to a board so that multiple people can see the board and
have access to it and maybe can make changes or can finish tasks and so forth.
All right.
So let's get started with that.
Therefore, I'm going to create a new activity, so here inside of Java activities, I'm going to create
a new activity called members activity.
So here, members activity.
Then I'm going to go to the manifest directly for the members activity to also.
Used the same approach or same layout settings that we have used for the other ones, I mean, the Orientation
and Action Bar, so here I'm going to add that to the members activity here directly.
That we are, so then the next thing is to design the activity, so let's go over to the resources.
And they're due to lay out.
As we have now created this activity members XML file.
You can, of course, download the XML file directly from the project, and by the way, of course,
we will also again have new dimensions here.
So let's add those real quick.
You can as well download the latest version of the dimensions, as always.
So it's just to hear members content putting and members KVI Marjo top and then we have some new strings.
So new words that we're using.
So let's put those in there as well.
And in this case is really just one word, and that is members.
OK, so now we can go back to our activity member's XML and look over it.
So we are using a linear layout and this is the design.
You can see here we have an app bar and then we have a list of members that currently are inside of
this board or are assigned to the board.
All right.
And then we have a bar layout, as you can see, which is just a toolbar, as we have done multiple
times already.
Then we have another linear layout, which is vertical in which we have a card for you, and then inside
of that car for you.
We have this respect of you.
OK, so basically it's just a huge card view which has the respective view inside of it.
And on top of that, we have an app here at the top.
That's it.
So this is our activity members XML.
And now if we look at the map, you can see that this is a menu.
All right.
So you can select multiple options here.
So let's go ahead and create a menu real quick because, well, this is very similar to the menu that
we have here.
So this is also a menu.
This one has two items, but the menu inside of the members screen only has one item on his dismembers
item.
So let's go ahead and create that.
And I'm just going to call this one menu members.
So let's go over to the menu folder.
So you have a folder here inside of your resources folder, which is called Menu.
And we have currently the activity main draw menu in there.
So now let's go ahead and create a new menu here, menu resource file.
And I'm going to call this one menu underscore members.
And the content that we want to have in there is one item, and this item is with an I.D., so it's
called action on the score members.
So once we click that we want something to happen or once we press on that and then you can set well,
you have to set the settings here for order and category.
So the order is going to be one hundred because, well, it doesn't really matter because we don't have
any other elements in here, so we don't have an order, so to speak.
Then it needs a title.
And here we are going to use the string that would be paired, which is this member's strength.
And so as action, I'm going to set that to never.
OK, so this is my item, this is the only item that I want to have in there.
Nothing too fancy, but now we, of course, need to enable this item.
All right.
So what would we do that?
Well, let's look at which activity we are in.
We are in the task list activity.
OK, so in this one, we need now to go ahead and add a new function which is still on.
Create options menu, so on create options menu, we need to override the default one here, as you
can see.
So the only thing that I will add here is that it should inflate the menu that I prepared.
So here, menu inflator and here you need to inflate.
And the menu resource that you want to inflate in my case is are the menu.
The menu underscore members.
Then.
You need to pass in the menu.
The cool thing is the menu is given to us, so I'm just going to pass in the menu that was given to
us by this concrete options menu.
Now, each time that you create an options menu, you also need to have options or options, items selected
if you want something to happen, if a user clicks on anything.
Right.
So here I'm just going to override this on options, items selected.
And then here we have one class where I'm just going to say when the item that was pressed has the item
ID and by the way, this is this item here that is given to me, the menu item when that is pressed.
And the item ID.
Is our action on the score members, which is the.
Action that we created, right?
It's this.
Item here, it has an ID if that thing is pressed, so if this member's is pressed, then.
I want to run some code and what is the code?
Well, for now, I'm just going to start an activity here.
So start activity.
With the intent from this activity, move over to the.
Members activity, members activity.
Colon, colon, plus the java.
Now we need to import intent, of course, so let's do that real quick import.
And now we should be able to test it.
So let's go ahead and test this on our emulator.
All right, so prosy Menasche.
Then we go to our board with image and now we see the three dots here, let's click on them.
We can see members there, let's click on members and we are brought to this activity.
All right.
So that's it for this video.
After all those long videos, I think it makes sense to have some short videos in between so that we
don't always have these 20 or 15 minute long videos.
So see you in the next one.