1
00:00:00,330 --> 00:00:01,260
Welcome back.

2
00:00:01,560 --> 00:00:07,320
Now that we are at the point where we can select the color and put the color in here, we so need to

3
00:00:07,320 --> 00:00:12,240
add this little checkbox here, which indicates which color we currently are using as we have prepared

4
00:00:12,240 --> 00:00:12,920
that image for you.

5
00:00:12,930 --> 00:00:13,180
Right.

6
00:00:13,200 --> 00:00:15,960
So it makes sense to also use at one point.

7
00:00:16,320 --> 00:00:20,810
And then we also need to take care of the members here.

8
00:00:20,820 --> 00:00:27,000
So we need to pass in the members from our board to our task lists, green to this one here and then

9
00:00:27,000 --> 00:00:32,670
to the card screen so that we can select members that are assigned to the board to a specific card.

10
00:00:34,160 --> 00:00:39,350
And also, even though we selected the color, let's select one, for example, here, when we come

11
00:00:39,350 --> 00:00:42,090
back to the screen, it's not there anymore, right?

12
00:00:42,110 --> 00:00:43,780
So we still need to reselected.

13
00:00:43,940 --> 00:00:45,650
So that's something that we need to fix now.

14
00:00:45,980 --> 00:00:50,150
So let's get started, first of all, in the cards, details screen in uncreate.

15
00:00:50,360 --> 00:00:52,580
That's where we can basically just do that.

16
00:00:52,580 --> 00:00:52,790
Right.

17
00:00:52,810 --> 00:00:56,510
So let's go ahead and add a line here, which will take care of that.

18
00:00:56,790 --> 00:00:59,670
So we need to use them.

19
00:00:59,690 --> 00:01:04,400
Selected color, which is a global variable.

20
00:01:06,180 --> 00:01:12,030
That created and we get it from M. board details.

21
00:01:13,420 --> 00:01:14,560
The task list.

22
00:01:15,870 --> 00:01:17,970
At the end, this position.

23
00:01:20,530 --> 00:01:24,010
Then Cartes position and basically the color, right?

24
00:01:24,040 --> 00:01:29,860
So this part here guards position that labor color.

25
00:01:31,780 --> 00:01:40,780
All right, at this point, we can check if the select color is not empty because it could be empty

26
00:01:40,780 --> 00:01:43,840
potentially, then set the color.

27
00:01:48,330 --> 00:01:55,290
Which is our function here, where we just set the color right, and then we can pass the selected color

28
00:01:56,010 --> 00:01:59,580
to show it has already selected with a tick I in the list.

29
00:01:59,590 --> 00:02:00,940
So let's do that as well.

30
00:02:01,470 --> 00:02:09,090
Therefore, in the label color list dialogue inside of our card details, we have this function called

31
00:02:09,840 --> 00:02:11,100
labor color list dialogue.

32
00:02:11,100 --> 00:02:13,350
And here, there we can now.

33
00:02:15,890 --> 00:02:23,680
The following, so let's go ahead and adjust our analyst dialogue a little bit because we get the selected

34
00:02:23,680 --> 00:02:24,520
color here, right?

35
00:02:26,640 --> 00:02:31,600
But we are not using it here yet, so am selected color.

36
00:02:32,460 --> 00:02:37,860
So I want to also pass on the select color to my label color list dialogue.

37
00:02:37,880 --> 00:02:40,500
So here to select color.

38
00:02:44,070 --> 00:02:48,120
And now, finally, we need to go to our car list items adapter.

39
00:02:49,370 --> 00:02:55,270
Activity or adapt or not the activity, so let's go over to our adapters here.

40
00:02:58,350 --> 00:03:05,520
List items that because that's where we have the actual list elements, right, and I want this a list

41
00:03:05,520 --> 00:03:10,320
element here to have a little tick box here, which is our little icon that we had there.

42
00:03:10,680 --> 00:03:14,860
And that's what we need to put into Unbind view Holder.

43
00:03:15,150 --> 00:03:18,030
So here we can check if.

44
00:03:20,190 --> 00:03:25,620
Model, not labor color dot is not empty.

45
00:03:26,940 --> 00:03:28,560
If that's the case, then.

46
00:03:29,670 --> 00:03:42,480
Use hold, so basically hold their item view that you underscore a label color visibility to.

47
00:03:43,800 --> 00:03:44,940
View visible.

48
00:03:49,550 --> 00:03:50,210
And then.

49
00:03:52,180 --> 00:04:01,870
Also set the background said background, color to color, not pass color.

50
00:04:03,250 --> 00:04:04,690
And here we need your person.

51
00:04:06,030 --> 00:04:10,740
Our model, our labor color, Soheir model thought labor color.

52
00:04:11,830 --> 00:04:18,089
OK, so let's put that into line so that we can read the whole quote here and then alternatively.

53
00:04:18,120 --> 00:04:26,080
So in the case that the labor color is in fact, empty, we can set the visibility to con.

54
00:04:32,000 --> 00:04:34,160
All right, now, at this point, I tested.

55
00:04:36,400 --> 00:04:43,380
All right, so let's check out the board with image that we can see the cart now has the color.

56
00:04:43,840 --> 00:04:45,430
So that is what we've done here.

57
00:04:45,430 --> 00:04:49,210
By the way, this little color item, you color visibility and so forth.

58
00:04:49,240 --> 00:04:52,960
So now we can see, OK, the color is green and inside of the cart.

59
00:04:53,770 --> 00:04:56,590
Well, as it seems, the color is not selected yet.

60
00:04:56,600 --> 00:05:01,180
So let's look into that a little because it still wasn't set there.

61
00:05:02,970 --> 00:05:10,290
And after a bit of debugging, I found the error or the problem, and it is stored in our data class

62
00:05:10,290 --> 00:05:18,630
card, we're not actually getting the constructor or we're not using our label color in the constructor.

63
00:05:18,900 --> 00:05:23,310
So here we also need to read the string of our constructor.

64
00:05:23,610 --> 00:05:29,440
And of course, we also need to write the string in our right to parcel.

65
00:05:29,670 --> 00:05:35,910
So here we, of course, need also to use the label color because otherwise, of course, the color

66
00:05:35,910 --> 00:05:36,780
will not be available.

67
00:05:36,780 --> 00:05:37,080
Right.

68
00:05:37,820 --> 00:05:38,230
All right.

69
00:05:38,250 --> 00:05:40,260
And at that point, let's test it again.

70
00:05:42,200 --> 00:05:48,160
And see if it actually is getting us the color here.

71
00:05:51,880 --> 00:05:58,240
So bored with image, let's click on the cart and we can see the colors here.

72
00:05:58,720 --> 00:05:59,130
All right.

73
00:05:59,140 --> 00:06:03,190
So that's why it's super important to look at the detail sometimes.

74
00:06:03,190 --> 00:06:03,450
Right?

75
00:06:03,870 --> 00:06:06,960
OK, I think that we should make a break at this point.

76
00:06:06,970 --> 00:06:13,660
So let's go ahead and look at the select members functionality here in the next video.

77
00:06:13,660 --> 00:06:14,470
So I'll see you there.

