1
00:00:00,670 --> 00:00:01,280
Welcome back.

2
00:00:01,480 --> 00:00:07,870
And this video, we are going to design every single item here, so the member, we're going to design

3
00:00:07,870 --> 00:00:08,750
something for it.

4
00:00:08,770 --> 00:00:16,000
So an example file and we will also pass in the information about the board to this activity, an intent

5
00:00:16,000 --> 00:00:19,720
so that we can also display something and the toolbar.

6
00:00:20,230 --> 00:00:21,670
OK, so let's get started.

7
00:00:22,000 --> 00:00:27,400
So the first thing that I want to do is I want to create the new constants in my.

8
00:00:28,580 --> 00:00:30,980
Constance file here in utils.

9
00:00:32,070 --> 00:00:38,070
So the consent should be the one that we use in order to pass information over to.

10
00:00:39,090 --> 00:00:40,080
The other activity.

11
00:00:40,230 --> 00:00:47,760
OK, so the two hour remember activity and I'm just going to call this one concert volume bought on

12
00:00:47,760 --> 00:00:50,700
the record detail, which will be a string.

13
00:00:50,700 --> 00:00:51,990
And I'm going to.

14
00:00:52,790 --> 00:00:55,670
Assigned text of board detail to it.

15
00:00:57,050 --> 00:01:03,240
All right, so that's our boarded up, then the next step is to pass details through the intent and

16
00:01:03,240 --> 00:01:06,920
that detail that we want to pass comes from the task list activity.

17
00:01:07,460 --> 00:01:13,370
OK, so here, when we are in on options items selected, we.

18
00:01:14,350 --> 00:01:18,790
Click on this action numbers, right, and here we start in activity, but I would also like to have

19
00:01:18,790 --> 00:01:19,890
some more details here.

20
00:01:20,260 --> 00:01:24,630
So let's now go ahead and create this intent separately.

21
00:01:25,240 --> 00:01:25,780
So here.

22
00:01:27,190 --> 00:01:34,630
Full intent will be this intent, and then I want to put some extra details to the intent.

23
00:01:34,900 --> 00:01:36,670
So that's always the same approach, right?

24
00:01:37,270 --> 00:01:41,590
Intent to put extra and then at the position of Constance.

25
00:01:43,150 --> 00:01:55,450
Thought work detail is where I want to pass in the more details, so our board details board and this

26
00:01:55,450 --> 00:02:01,990
of course only works because our board tails is a tie board and our board is a part syllable.

27
00:02:02,510 --> 00:02:09,009
OK, so we are passing a whole object because it's made to a string, so to speak.

28
00:02:09,009 --> 00:02:14,350
So it's transferred to a string so that we can put that as extra information there.

29
00:02:15,310 --> 00:02:16,330
OK, so.

30
00:02:16,330 --> 00:02:17,770
And has this activity.

31
00:02:20,240 --> 00:02:26,870
We now have this intent, we put it as extra information, and then we can start this intent.

32
00:02:29,430 --> 00:02:29,910
All right.

33
00:02:30,150 --> 00:02:32,940
And in our members activity now, we can catch it.

34
00:02:33,240 --> 00:02:38,240
All right, so we, of course, need to get the value somewhere and store it somewhere.

35
00:02:38,250 --> 00:02:39,390
So I'm just going to.

36
00:02:40,910 --> 00:02:49,520
Created late in it again, as we've done so late in advance, and this one will also be called on board

37
00:02:49,520 --> 00:02:52,520
details, which will also be a board object.

38
00:02:53,420 --> 00:02:53,910
All right.

39
00:02:53,930 --> 00:02:59,060
So we need to import board, of course, because this class doesn't know about board and then we can

40
00:02:59,060 --> 00:03:06,390
initialize it and we can initialize it in our own create and only if the intent has some extra information.

41
00:03:06,410 --> 00:03:13,480
So if the intent has extra four constants, that board detail.

42
00:03:14,180 --> 00:03:16,100
So that's the concept that we just created.

43
00:03:16,100 --> 00:03:16,340
Right.

44
00:03:16,340 --> 00:03:18,370
Which is just words on the details.

45
00:03:18,740 --> 00:03:25,790
So if at that position there are some extra information, then use those information to store them in

46
00:03:25,790 --> 00:03:26,660
more details.

47
00:03:27,140 --> 00:03:32,600
So this is basically just passing information from one screen to another.

48
00:03:32,600 --> 00:03:38,560
But this time we're not just getting a string or something like that, but we're getting pasodoble extra.

49
00:03:38,690 --> 00:03:45,980
You could see here intent get Pozible extra and then we, of course, need to say what we want to have

50
00:03:45,980 --> 00:03:47,810
and that's constants.

51
00:03:49,550 --> 00:03:51,380
That board detail.

52
00:03:53,020 --> 00:03:54,310
Now, you can add.

53
00:03:55,360 --> 00:03:59,560
Something like this here where you say of which type it will be specifically.

54
00:03:59,630 --> 00:04:07,320
OK, so the possible extra information will be of type and then it will put that into the and details.

55
00:04:09,630 --> 00:04:15,840
Now we can go ahead and set up the toolbar and I will do it the same way as I have done in multiple

56
00:04:15,840 --> 00:04:22,650
other activities, and I think it makes sense to go to the main activity to get it from there.

57
00:04:23,620 --> 00:04:29,260
Because we've done it so many times, right, and let's just reuse it if we can.

58
00:04:30,370 --> 00:04:31,840
So set up action bar.

59
00:04:32,990 --> 00:04:34,370
Actually, I don't like this one.

60
00:04:35,610 --> 00:04:41,790
I prefer the one from my profile activity, so in my profile activity, we set up this action bar,

61
00:04:41,790 --> 00:04:42,080
right.

62
00:04:42,510 --> 00:04:46,040
And I want to use the same here in my member's activity.

63
00:04:47,710 --> 00:04:54,610
Only with some adjustments, of course, so here, set up action bar should be for toolbar.

64
00:04:56,040 --> 00:05:02,220
On the score and it's in the members activity or it's called to bar members activity, so it's this

65
00:05:02,220 --> 00:05:06,680
toolbar here that we created in this XML file earlier on.

66
00:05:06,690 --> 00:05:06,940
Right.

67
00:05:07,710 --> 00:05:09,300
So it's this ID.

68
00:05:10,250 --> 00:05:11,490
We just copied it, actually.

69
00:05:11,600 --> 00:05:17,300
We didn't really create it, but, yeah, we created at one point and then with the action bar we check

70
00:05:17,300 --> 00:05:27,140
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.

71
00:05:28,740 --> 00:05:29,860
Or we could leave it.

72
00:05:30,450 --> 00:05:33,200
Well, we could use members here, right?

73
00:05:36,980 --> 00:05:42,230
Which is this one, so if you want to set a title, that's how you can do it, of course we will see

74
00:05:42,230 --> 00:05:47,180
if that looks good or not, then, of course, we have to be careful that we don't use a toolbar from

75
00:05:47,180 --> 00:05:50,020
another activity because this definitely will cause a crash.

76
00:05:50,300 --> 00:05:54,450
So if you ever do that, it will cause a crash and you will see that it's not going to work.

77
00:05:54,860 --> 00:05:55,190
All right.

78
00:05:55,190 --> 00:05:59,660
So you have to use the toolbar that is available, of course, in this member's activity, which is

79
00:05:59,660 --> 00:06:02,600
the one inside of this layout called activity members.

80
00:06:03,570 --> 00:06:10,710
OK, then at this point, we can now go ahead and set the navigation unclick lisner, which will just

81
00:06:10,710 --> 00:06:12,150
do a big press.

82
00:06:13,960 --> 00:06:20,170
And of course, we may not forget to also add that here in the uncreate.

83
00:06:21,280 --> 00:06:21,820
So.

84
00:06:23,080 --> 00:06:26,530
Set up action bar, we need to call this function at one point, of course.

85
00:06:28,180 --> 00:06:35,980
Now, the next thing would be to design the member items, right, so let's just do that.

86
00:06:36,340 --> 00:06:38,770
Let's go ahead and create a new layout.

87
00:06:40,830 --> 00:06:48,750
And here you lay out a file and I'm going to call this one item on the score member, so this one is

88
00:06:48,750 --> 00:06:53,030
going to take care of every single member or every individual member.

89
00:06:53,730 --> 00:06:57,150
And the code here is going to be a linear layout.

90
00:06:57,150 --> 00:07:03,210
So you can just download the code once again and I will walk you through it real quick.

91
00:07:04,950 --> 00:07:08,950
Of course, we will need some new dimensions so you can also download the dimensions file.

92
00:07:09,390 --> 00:07:15,450
I just think that at this point the project is already long enough that I don't want to bore you with

93
00:07:16,140 --> 00:07:17,580
entering everything here.

94
00:07:17,820 --> 00:07:23,280
So you can see with a bunch of dimensions, just download the updated dimensions file for this project.

95
00:07:23,460 --> 00:07:26,820
You can find it assigned to this video.

96
00:07:26,950 --> 00:07:29,060
And then let's look at item member.

97
00:07:29,310 --> 00:07:31,130
So it's basically what you can see here.

98
00:07:31,140 --> 00:07:36,270
So we have this icon here or this image, then the member name and the email address.

99
00:07:37,300 --> 00:07:45,790
All right, so it's a linear layout, vertically oriented with another linear layout, horizontally

100
00:07:45,940 --> 00:07:53,560
oriented, which we have the circular image view and then we have the linear layout inside of it, which

101
00:07:53,560 --> 00:07:59,200
is vertical again, where we have the two textures on top of each other, and then we have a little

102
00:07:59,200 --> 00:08:01,540
separator, which is this view here.

103
00:08:02,810 --> 00:08:05,060
Or it's a divider, so to speak.

104
00:08:05,390 --> 00:08:13,550
OK, so then it will look like what you see here where we have the member name, email address and then

105
00:08:13,550 --> 00:08:20,090
a little divider here at the bottom so that we can see where one starts and the other ends or the other

106
00:08:20,090 --> 00:08:20,600
way around.

107
00:08:21,350 --> 00:08:21,850
All right.

108
00:08:21,890 --> 00:08:23,930
So that is it for this video.

109
00:08:23,960 --> 00:08:29,810
In the next video, we are going to add the code that allows us to, of course, display the data in

110
00:08:29,810 --> 00:08:31,280
the member's activity.

111
00:08:31,850 --> 00:08:32,960
OK, so see you there.

