1
00:00:00,480 --> 00:00:05,040
We'll come back and this would be a we are going to add the functionality that you see here, so the

2
00:00:05,040 --> 00:00:11,700
settings at the top where you can then go to members and then here currently we don't see anything,

3
00:00:11,700 --> 00:00:19,380
but we want to also be able to add members to a board so that multiple people can see the board and

4
00:00:19,380 --> 00:00:25,170
have access to it and maybe can make changes or can finish tasks and so forth.

5
00:00:25,620 --> 00:00:26,090
All right.

6
00:00:26,490 --> 00:00:27,810
So let's get started with that.

7
00:00:29,350 --> 00:00:37,210
Therefore, I'm going to create a new activity, so here inside of Java activities, I'm going to create

8
00:00:37,210 --> 00:00:41,440
a new activity called members activity.

9
00:00:43,280 --> 00:00:47,090
So here, members activity.

10
00:00:50,940 --> 00:00:57,120
Then I'm going to go to the manifest directly for the members activity to also.

11
00:00:58,210 --> 00:01:05,650
Used the same approach or same layout settings that we have used for the other ones, I mean, the Orientation

12
00:01:06,010 --> 00:01:11,980
and Action Bar, so here I'm going to add that to the members activity here directly.

13
00:01:12,960 --> 00:01:20,310
That we are, so then the next thing is to design the activity, so let's go over to the resources.

14
00:01:21,530 --> 00:01:23,450
And they're due to lay out.

15
00:01:25,140 --> 00:01:29,760
As we have now created this activity members XML file.

16
00:01:31,380 --> 00:01:37,020
You can, of course, download the XML file directly from the project, and by the way, of course,

17
00:01:37,020 --> 00:01:40,670
we will also again have new dimensions here.

18
00:01:41,190 --> 00:01:43,020
So let's add those real quick.

19
00:01:43,020 --> 00:01:48,050
You can as well download the latest version of the dimensions, as always.

20
00:01:48,420 --> 00:01:57,160
So it's just to hear members content putting and members KVI Marjo top and then we have some new strings.

21
00:01:57,160 --> 00:01:58,780
So new words that we're using.

22
00:01:58,800 --> 00:02:00,630
So let's put those in there as well.

23
00:02:00,990 --> 00:02:04,530
And in this case is really just one word, and that is members.

24
00:02:05,160 --> 00:02:10,820
OK, so now we can go back to our activity member's XML and look over it.

25
00:02:10,830 --> 00:02:14,270
So we are using a linear layout and this is the design.

26
00:02:14,610 --> 00:02:20,490
You can see here we have an app bar and then we have a list of members that currently are inside of

27
00:02:20,880 --> 00:02:22,840
this board or are assigned to the board.

28
00:02:23,430 --> 00:02:23,890
All right.

29
00:02:23,910 --> 00:02:30,900
And then we have a bar layout, as you can see, which is just a toolbar, as we have done multiple

30
00:02:30,900 --> 00:02:31,630
times already.

31
00:02:32,130 --> 00:02:39,540
Then we have another linear layout, which is vertical in which we have a card for you, and then inside

32
00:02:39,540 --> 00:02:40,130
of that car for you.

33
00:02:40,140 --> 00:02:41,340
We have this respect of you.

34
00:02:41,880 --> 00:02:47,880
OK, so basically it's just a huge card view which has the respective view inside of it.

35
00:02:47,880 --> 00:02:50,420
And on top of that, we have an app here at the top.

36
00:02:50,880 --> 00:02:51,360
That's it.

37
00:02:52,080 --> 00:02:54,020
So this is our activity members XML.

38
00:02:54,970 --> 00:02:59,650
And now if we look at the map, you can see that this is a menu.

39
00:02:59,830 --> 00:03:00,240
All right.

40
00:03:00,250 --> 00:03:02,540
So you can select multiple options here.

41
00:03:02,800 --> 00:03:08,740
So let's go ahead and create a menu real quick because, well, this is very similar to the menu that

42
00:03:08,740 --> 00:03:09,240
we have here.

43
00:03:09,250 --> 00:03:10,660
So this is also a menu.

44
00:03:10,690 --> 00:03:17,850
This one has two items, but the menu inside of the members screen only has one item on his dismembers

45
00:03:18,010 --> 00:03:18,390
item.

46
00:03:18,700 --> 00:03:20,290
So let's go ahead and create that.

47
00:03:21,690 --> 00:03:24,270
And I'm just going to call this one menu members.

48
00:03:24,300 --> 00:03:27,690
So let's go over to the menu folder.

49
00:03:27,690 --> 00:03:31,500
So you have a folder here inside of your resources folder, which is called Menu.

50
00:03:31,500 --> 00:03:34,800
And we have currently the activity main draw menu in there.

51
00:03:35,280 --> 00:03:38,460
So now let's go ahead and create a new menu here, menu resource file.

52
00:03:38,760 --> 00:03:41,910
And I'm going to call this one menu underscore members.

53
00:03:43,200 --> 00:03:53,640
And the content that we want to have in there is one item, and this item is with an I.D., so it's

54
00:03:53,640 --> 00:03:56,120
called action on the score members.

55
00:03:56,730 --> 00:04:02,970
So once we click that we want something to happen or once we press on that and then you can set well,

56
00:04:02,970 --> 00:04:05,810
you have to set the settings here for order and category.

57
00:04:05,820 --> 00:04:10,410
So the order is going to be one hundred because, well, it doesn't really matter because we don't have

58
00:04:10,410 --> 00:04:14,060
any other elements in here, so we don't have an order, so to speak.

59
00:04:14,490 --> 00:04:16,170
Then it needs a title.

60
00:04:16,200 --> 00:04:21,720
And here we are going to use the string that would be paired, which is this member's strength.

61
00:04:22,550 --> 00:04:27,860
And so as action, I'm going to set that to never.

62
00:04:28,960 --> 00:04:32,560
OK, so this is my item, this is the only item that I want to have in there.

63
00:04:32,740 --> 00:04:37,420
Nothing too fancy, but now we, of course, need to enable this item.

64
00:04:37,660 --> 00:04:38,020
All right.

65
00:04:38,020 --> 00:04:39,680
So what would we do that?

66
00:04:39,700 --> 00:04:41,970
Well, let's look at which activity we are in.

67
00:04:42,010 --> 00:04:44,160
We are in the task list activity.

68
00:04:44,680 --> 00:04:52,840
OK, so in this one, we need now to go ahead and add a new function which is still on.

69
00:04:53,780 --> 00:05:01,340
Create options menu, so on create options menu, we need to override the default one here, as you

70
00:05:01,340 --> 00:05:01,840
can see.

71
00:05:02,210 --> 00:05:08,420
So the only thing that I will add here is that it should inflate the menu that I prepared.

72
00:05:08,630 --> 00:05:13,400
So here, menu inflator and here you need to inflate.

73
00:05:13,700 --> 00:05:17,540
And the menu resource that you want to inflate in my case is are the menu.

74
00:05:17,540 --> 00:05:19,940
The menu underscore members.

75
00:05:21,110 --> 00:05:21,550
Then.

76
00:05:23,020 --> 00:05:24,630
You need to pass in the menu.

77
00:05:24,700 --> 00:05:30,190
The cool thing is the menu is given to us, so I'm just going to pass in the menu that was given to

78
00:05:30,190 --> 00:05:32,020
us by this concrete options menu.

79
00:05:33,590 --> 00:05:40,310
Now, each time that you create an options menu, you also need to have options or options, items selected

80
00:05:40,310 --> 00:05:43,640
if you want something to happen, if a user clicks on anything.

81
00:05:43,640 --> 00:05:43,880
Right.

82
00:05:44,270 --> 00:05:47,690
So here I'm just going to override this on options, items selected.

83
00:05:48,110 --> 00:05:56,090
And then here we have one class where I'm just going to say when the item that was pressed has the item

84
00:05:56,090 --> 00:06:01,160
ID and by the way, this is this item here that is given to me, the menu item when that is pressed.

85
00:06:02,780 --> 00:06:05,450
And the item ID.

86
00:06:07,170 --> 00:06:11,160
Is our action on the score members, which is the.

87
00:06:12,740 --> 00:06:14,230
Action that we created, right?

88
00:06:14,450 --> 00:06:15,200
It's this.

89
00:06:16,910 --> 00:06:24,800
Item here, it has an ID if that thing is pressed, so if this member's is pressed, then.

90
00:06:25,750 --> 00:06:28,080
I want to run some code and what is the code?

91
00:06:28,090 --> 00:06:30,550
Well, for now, I'm just going to start an activity here.

92
00:06:30,940 --> 00:06:33,430
So start activity.

93
00:06:34,780 --> 00:06:40,060
With the intent from this activity, move over to the.

94
00:06:41,060 --> 00:06:44,480
Members activity, members activity.

95
00:06:46,220 --> 00:06:49,280
Colon, colon, plus the java.

96
00:06:50,520 --> 00:06:54,210
Now we need to import intent, of course, so let's do that real quick import.

97
00:06:55,870 --> 00:06:58,100
And now we should be able to test it.

98
00:06:58,360 --> 00:07:03,100
So let's go ahead and test this on our emulator.

99
00:07:04,000 --> 00:07:05,710
All right, so prosy Menasche.

100
00:07:06,890 --> 00:07:14,060
Then we go to our board with image and now we see the three dots here, let's click on them.

101
00:07:14,270 --> 00:07:19,690
We can see members there, let's click on members and we are brought to this activity.

102
00:07:20,570 --> 00:07:20,950
All right.

103
00:07:20,960 --> 00:07:22,270
So that's it for this video.

104
00:07:22,430 --> 00:07:27,290
After all those long videos, I think it makes sense to have some short videos in between so that we

105
00:07:27,290 --> 00:07:30,130
don't always have these 20 or 15 minute long videos.

106
00:07:30,130 --> 00:07:31,330
So see you in the next one.

