1
00:00:00,420 --> 00:00:01,200
Welcome back.

2
00:00:01,440 --> 00:00:07,500
Now let's go ahead and take care of setting this screen up, or at least parts of it, so we are going

3
00:00:07,500 --> 00:00:11,210
to start with just getting the title here at the top.

4
00:00:11,460 --> 00:00:14,850
So we want to get the card name here at the very top.

5
00:00:14,850 --> 00:00:16,059
So let's get started with this.

6
00:00:16,690 --> 00:00:21,720
OK, so let's go into our card list, details activity.

7
00:00:22,230 --> 00:00:26,840
And here we are going to set up the action bar.

8
00:00:26,850 --> 00:00:31,890
So it's going to be the same thing as we have done multiple times already, for example.

9
00:00:31,890 --> 00:00:38,400
And the members activities or just copy this function, we're going to use a very similar one or we're

10
00:00:38,400 --> 00:00:39,690
just going to adjust it a little bit.

11
00:00:39,960 --> 00:00:41,640
So set up action bar here.

12
00:00:41,650 --> 00:00:46,560
We, of course, want to use toolbar on the score card.

13
00:00:47,750 --> 00:00:53,210
Details activity, this one, and we want to make sure that we added it here at the bottom as well.

14
00:00:54,970 --> 00:01:00,560
The rest stays the same, except for, of course, the title, because we want to get the title dynamically.

15
00:01:01,090 --> 00:01:02,980
All right, the rest can stay the same.

16
00:01:02,980 --> 00:01:07,990
So we get the support action bar we have and home is up indicator, which is the back button.

17
00:01:08,380 --> 00:01:10,870
And we have the on back press functionality.

18
00:01:11,110 --> 00:01:13,140
So very similar to what we've done before.

19
00:01:13,360 --> 00:01:19,150
And then we can, of course, call this function inside of our own create so that it will be displayed.

20
00:01:19,570 --> 00:01:22,210
OK, so that's step number one then.

21
00:01:22,570 --> 00:01:31,930
What we need is we need to know the details about the position of the card as well as the position of

22
00:01:31,930 --> 00:01:32,710
the task list.

23
00:01:33,060 --> 00:01:35,320
OK, we looked at this in the last video.

24
00:01:35,740 --> 00:01:38,790
So, for example, we need to know which card we clicked on.

25
00:01:38,890 --> 00:01:43,870
Therefore, we need to know which tasks list we are and then the position of the card itself.

26
00:01:44,880 --> 00:01:50,820
And in order to get this information, we can pass it from this activity, so from this board's detailed

27
00:01:50,820 --> 00:01:53,230
activity to the court detail activity.

28
00:01:53,970 --> 00:01:54,360
All right.

29
00:01:54,360 --> 00:02:01,560
So let's, first of all, create a concern because we need to get those values via an intent.

30
00:02:01,960 --> 00:02:08,770
And if we put extra information, it's always good to have a key which is easily identifiable and unique.

31
00:02:09,240 --> 00:02:13,140
OK, so we can, of course, go ahead and use the constants.

32
00:02:13,140 --> 00:02:19,050
Therefore, so here are constants variable and I'm just going to work or class and I'm just going to

33
00:02:19,050 --> 00:02:22,340
use the two constants, which will be constant.

34
00:02:22,350 --> 00:02:27,420
All task list, item position.

35
00:02:28,900 --> 00:02:35,710
Which will be a string which says task list, item position.

36
00:02:38,050 --> 00:02:39,490
All right, so.

37
00:02:40,790 --> 00:02:46,520
This is number one, and then we have another one, which will be called.

38
00:02:48,330 --> 00:02:50,580
List item position.

39
00:02:51,630 --> 00:02:55,740
And that one will be the same thing pretty much so year.

40
00:02:57,580 --> 00:03:01,280
Let's replace this with a card list item position.

41
00:03:01,930 --> 00:03:09,280
OK, so these are the two strings that we are going to use whenever we use the intense and that's what

42
00:03:09,280 --> 00:03:13,750
we need to look at inside of our task list activity.

43
00:03:14,260 --> 00:03:19,690
OK, so here we have this function, which we called card details.

44
00:03:20,050 --> 00:03:28,570
OK, so here we start the activity with the intent, but now it makes sense to have an extra variable

45
00:03:28,780 --> 00:03:31,120
intent, which we can then modify.

46
00:03:31,390 --> 00:03:38,200
OK, so we're just going to say let's create a new intent, then let's put extra information to this

47
00:03:38,200 --> 00:03:38,640
intent.

48
00:03:39,040 --> 00:03:44,620
So put extra at the position constants that for detail.

49
00:03:47,590 --> 00:03:48,280
And here.

50
00:03:49,730 --> 00:03:56,480
We want to send over the whole board details object, so if you look at it, it's the board that we're

51
00:03:56,480 --> 00:03:57,230
currently at.

52
00:03:58,160 --> 00:04:01,910
So that's step number one or the first information that we pass.

53
00:04:02,330 --> 00:04:07,700
And then we, of course, need to know the task, this position, as well as the card position.

54
00:04:08,090 --> 00:04:11,810
OK, so here intent put extra.

55
00:04:14,330 --> 00:04:16,130
Constance thought.

56
00:04:17,480 --> 00:04:19,910
Task list item position.

57
00:04:20,970 --> 00:04:22,600
And what we pass here?

58
00:04:22,620 --> 00:04:28,110
Well, our task, this position, so this variable that we get from countless details, once it's called,

59
00:04:28,110 --> 00:04:36,340
it's called, and then we do the same thing with that next line, which is the hardest position, hottest

60
00:04:36,360 --> 00:04:37,120
item position.

61
00:04:37,890 --> 00:04:38,880
OK, so here.

62
00:04:41,260 --> 00:04:44,020
Here is the card list IETA position.

63
00:04:46,020 --> 00:04:47,370
And then it's the.

64
00:04:48,650 --> 00:04:50,000
Card position.

65
00:04:52,030 --> 00:04:52,460
All right.

66
00:04:52,600 --> 00:04:57,820
And this in turn that we prepared now is what we can send over with this activity.

67
00:04:59,500 --> 00:05:05,830
Now, of course, we want to get this information, so we want to get the information from the intent

68
00:05:06,190 --> 00:05:14,890
in our car, details activity, and I'm going to create global variables, which we will use in order

69
00:05:14,890 --> 00:05:17,080
to then get those details.

70
00:05:17,260 --> 00:05:20,770
OK, so here private let in.

71
00:05:20,770 --> 00:05:23,620
It will be our embassy details.

72
00:05:27,300 --> 00:05:36,480
Which will be a board object, because, as you recall, we sent this information over here, we sent

73
00:05:36,480 --> 00:05:37,470
the whole board over.

74
00:05:39,310 --> 00:05:49,450
And then the next thing is our task this session, and I'm going to use private var and task list position.

75
00:05:52,220 --> 00:05:52,970
Which will be.

76
00:05:55,240 --> 00:05:58,610
Minus one, so that's number one.

77
00:05:58,660 --> 00:06:05,920
And then private bar and card position, which I'm also going to set to minus one, because if I set

78
00:06:05,920 --> 00:06:12,210
them to minus one, I know that I don't have the real values because they cannot be minus one.

79
00:06:12,430 --> 00:06:13,720
They always have to be positive.

80
00:06:13,720 --> 00:06:13,980
Right.

81
00:06:15,990 --> 00:06:19,770
OK, now we need to get the intent data and therefore we can set up a new function.

82
00:06:20,220 --> 00:06:24,510
So private phone, get Internet data.

83
00:06:25,790 --> 00:06:33,530
Here, we just checked the intent, if that has some extra information, so it has extra, for example,

84
00:06:33,770 --> 00:06:42,650
Constance thought or details, so if it has the details, then I want to assign those two and details.

85
00:06:42,860 --> 00:06:51,350
So here, intent get passed a little extra called Constance thought 42.

86
00:06:53,480 --> 00:07:04,670
All right, and then we can do another check, so here, if the intent has extra at the position, Constance.

87
00:07:05,760 --> 00:07:06,180
But.

88
00:07:07,900 --> 00:07:15,760
Carlist position or Eitam position, I think let's start with this one, if that's the case, then I

89
00:07:15,820 --> 00:07:16,510
signed the.

90
00:07:17,950 --> 00:07:28,000
Passivist position, so we call this task, this position with the intent to get into extra.

91
00:07:29,260 --> 00:07:34,480
At the position, Constance, that passed this Diatta position.

92
00:07:36,990 --> 00:07:43,440
And he can assign a default value, so if we get nothing, well, then let's use the default value of

93
00:07:43,440 --> 00:07:44,040
minus one.

94
00:07:45,840 --> 00:07:48,810
All right, so here I am using default value minus one.

95
00:07:49,200 --> 00:07:54,360
So maybe it makes sense to put that into two lines and now we do the same thing once again here.

96
00:07:55,590 --> 00:07:59,250
With the cart list item position.

97
00:08:01,360 --> 00:08:02,590
So we can just say.

98
00:08:05,810 --> 00:08:07,430
Cardless Eitam position.

99
00:08:08,650 --> 00:08:13,750
Should be my card list item or card position, it's how we call it, that's it.

100
00:08:14,170 --> 00:08:20,020
So now we have those checks here where we get, first of all, the board details.

101
00:08:20,020 --> 00:08:23,470
Then we get the task list item position and then the card list item position.

102
00:08:25,020 --> 00:08:29,940
All right, now we can get the Internet data in our uncreate function.

103
00:08:31,740 --> 00:08:37,820
So here, get Internet data, and now we can use that, get Internet data inside of our set up action

104
00:08:37,830 --> 00:08:38,220
bar.

105
00:08:39,610 --> 00:08:45,370
Not the function itself, but whatever word results, because now we have the details and we want to

106
00:08:45,370 --> 00:08:47,970
specifically load the title.

107
00:08:48,130 --> 00:08:55,090
So here, Action Bar, that title should be our more details.

108
00:08:56,360 --> 00:09:02,210
Fastest at the position of our task list position.

109
00:09:03,310 --> 00:09:03,880
And then.

110
00:09:06,410 --> 00:09:11,840
The cards name, so cards at the ATM card position.

111
00:09:12,800 --> 00:09:13,400
That name.

112
00:09:16,000 --> 00:09:17,920
OK, so basically we say.

113
00:09:19,600 --> 00:09:25,150
The more details that you have passed to me, check out the task list and then check out the card.

114
00:09:26,590 --> 00:09:28,540
In that position and give me the name of it.

115
00:09:30,770 --> 00:09:36,410
So if we look at our words here, for example, this board here has a task list.

116
00:09:37,170 --> 00:09:39,640
All right, so here it has this.

117
00:09:39,640 --> 00:09:40,880
It has multiple entries.

118
00:09:40,880 --> 00:09:45,380
So, for example, it has this at position zero has cards.

119
00:09:45,830 --> 00:09:53,140
For example, the card at position zero will be card one, which says well, which currently has just

120
00:09:53,150 --> 00:09:56,240
a name, card one, which is created by a specific user.

121
00:09:57,470 --> 00:09:58,000
OK.

122
00:09:59,300 --> 00:10:02,390
So that is what we basically want to work with.

123
00:10:03,940 --> 00:10:10,810
All right, and at that point, we should get the name once we click on any of the cards.

124
00:10:11,470 --> 00:10:11,890
All right.

125
00:10:11,890 --> 00:10:14,950
So should at least get the name in the title here at the top.

126
00:10:14,950 --> 00:10:21,130
Of course, we want to get a lot more information, but that's what we'll have to do afterwards.

127
00:10:21,310 --> 00:10:22,690
So, first of all, let's do that.

128
00:10:22,820 --> 00:10:24,490
Let's go to board with image.

129
00:10:25,180 --> 00:10:26,350
Let's click on card one.

130
00:10:26,350 --> 00:10:30,290
And we can see here at the top card one is, in fact, there.

131
00:10:30,520 --> 00:10:32,360
Let's test this with Kartu as well.

132
00:10:32,410 --> 00:10:37,000
We can see Kartu is there and called three to see if it wasn't chance.

133
00:10:37,400 --> 00:10:39,010
It's right there as well.

134
00:10:39,250 --> 00:10:42,420
So let's create a random name here as well.

135
00:10:42,880 --> 00:10:43,720
Random name.

136
00:10:46,850 --> 00:10:52,220
And let's open this one and we can see random names up there as well.

137
00:10:52,610 --> 00:10:54,110
OK, so that seems to work.

138
00:10:54,500 --> 00:10:59,960
That means that we get the card now, because if we look at it, we can see that.

139
00:11:01,910 --> 00:11:08,480
Here we get the whole card, so we cannot just get the name, we could get anything from the card created

140
00:11:08,480 --> 00:11:14,840
by, assigned to and so forth, so now we can, of course, make adjustments.

141
00:11:15,350 --> 00:11:22,460
Now, card is of type card, and here we will, of course, need to also make changes because we currently

142
00:11:22,460 --> 00:11:25,420
don't have any details about the color.

143
00:11:25,460 --> 00:11:28,640
Neither do we have details about the due date and so forth.

144
00:11:28,910 --> 00:11:29,420
All right.

145
00:11:30,140 --> 00:11:34,730
I'll see you in the next video where we're going to adjust things step by step.

