1
00:00:00,270 --> 00:00:07,320
So now as you can see our application is running on this emulator and here I can actually select this

2
00:00:07,680 --> 00:00:12,630
rating but here for example I want to actually assign the value of three stars and now as you can see

3
00:00:12,630 --> 00:00:19,710
it says the number of stars are 2.4 2.5 get the value of this rating but is 2.5 or can actually make

4
00:00:19,910 --> 00:00:22,190
your stars the number of stars are free.

5
00:00:22,200 --> 00:00:22,980
Point zero.

6
00:00:23,120 --> 00:00:24,730
OK.

7
00:00:24,790 --> 00:00:28,230
As you can see it says the number of stars are 3.5.

8
00:00:28,230 --> 00:00:31,050
The number of stars are four I can actually change.

9
00:00:31,050 --> 00:00:37,040
This takes two other takes for example the value of stars are here I can actually change these numbers

10
00:00:37,080 --> 00:00:38,640
to value.

11
00:00:38,880 --> 00:00:41,890
And now it's actually on our project again.

12
00:00:41,970 --> 00:00:48,180
So now I can actually give value to the rating board for example here the value of stars are free or

13
00:00:48,180 --> 00:00:49,480
here or here.

14
00:00:49,620 --> 00:00:51,960
You can actually see this value here or here.

15
00:00:51,960 --> 00:00:52,550
OK.

16
00:00:52,560 --> 00:00:54,410
So you can see this TOSed object here.

17
00:00:54,450 --> 00:00:55,330
OK.

18
00:00:55,350 --> 00:00:57,160
So hopefully that makes sense.

19
00:00:57,550 --> 00:01:02,250
And now we have these are radio buttons inside our radio group.

20
00:01:02,250 --> 00:01:08,670
So now I want to make these radio buttons that are inside of an order or radio group I want to make

21
00:01:08,670 --> 00:01:11,880
these radio buttons a listener to the police if they use that.

22
00:01:11,880 --> 00:01:12,420
OK.

23
00:01:12,420 --> 00:01:17,340
So because these radio buttons are actually inside of an other radio group.

24
00:01:17,400 --> 00:01:23,690
I need to actually type in here a radio group that sits on checked change.

25
00:01:23,690 --> 00:01:24,510
Listener.

26
00:01:24,720 --> 00:01:25,140
OK.

27
00:01:25,260 --> 00:01:30,880
So many to actually call this method on the object radio group that said unchecked change the listener

28
00:01:31,350 --> 00:01:36,190
and inside the prentices I need to pass in the context main activity that is OK.

29
00:01:36,330 --> 00:01:42,060
And now we need to actually implement their antic change listen at of Radio Group here in our class.

30
00:01:42,240 --> 00:01:45,610
So here I just need to put in a comma here.

31
00:01:45,750 --> 00:01:51,520
Radio Group OK that on check out change listener.

32
00:01:51,740 --> 00:01:52,180
OK.

33
00:01:52,320 --> 00:01:55,590
And now we to actually implement the required methods.

34
00:01:55,590 --> 00:02:00,750
So after the end in curly brace of this uncreate method here are connected to right click on my class

35
00:02:01,190 --> 00:02:06,100
and click on generate and then click on implement methods.

36
00:02:06,360 --> 00:02:10,280
And as you can see here we need to actually implement this Antek change a method here.

37
00:02:10,290 --> 00:02:10,740
OK.

38
00:02:10,770 --> 00:02:14,750
That is inside of this on take it or change the center interface.

39
00:02:14,760 --> 00:02:16,730
So here I just need to click on OK.

40
00:02:16,890 --> 00:02:19,310
I just need to select the Smurfit and then click on OK.

41
00:02:19,410 --> 00:02:23,690
So this is my fifth and here as you can see if it returns void.

42
00:02:23,880 --> 00:02:28,410
And this means that if it is going to return nothing that the name of this man if it is on take the

43
00:02:28,410 --> 00:02:30,950
change and this reflection to accepts two arguments.

44
00:02:30,960 --> 00:02:33,890
Ok Radio Group group and checked ID.

45
00:02:34,080 --> 00:02:34,720
OK.

46
00:02:35,040 --> 00:02:37,950
And a district ID is the ID of.

47
00:02:38,040 --> 00:02:40,960
Actually the radio buttons inside the radio group.

48
00:02:40,980 --> 00:02:45,190
OK so we can actually access these are objects these radio buttons.

49
00:02:45,270 --> 00:02:46,740
But using these checks ID.

50
00:02:46,740 --> 00:02:51,900
OK so now I'm going to actually pasting some lines of code here and then I'm going to explain to you

51
00:02:51,900 --> 00:02:53,120
what's going on here.

52
00:02:53,490 --> 00:02:58,430
So as you can see here I actually pasted this switch statement inside this method.

53
00:02:58,440 --> 00:02:58,920
OK.

54
00:02:59,020 --> 00:03:03,490
So so each Ok so it's going actually to switch between the values of these checked ID.

55
00:03:03,510 --> 00:03:10,050
OK so as I said earlier this check ID is the ID of these radio buttons inside of this.

56
00:03:10,200 --> 00:03:14,530
So we can access these objects these components by using these are checked IDs.

57
00:03:14,550 --> 00:03:15,120
OK.

58
00:03:15,120 --> 00:03:17,940
So so each checked ID case.

59
00:03:17,940 --> 00:03:25,590
So in case that if the value of these fake IDs or radio button or one if the ID of these checked ID

60
00:03:25,830 --> 00:03:30,160
is you are not in one as you can see then it's going to execute this line of code here.

61
00:03:30,180 --> 00:03:31,570
Android is checked.

62
00:03:31,620 --> 00:03:32,100
OK.

63
00:03:32,250 --> 00:03:33,990
So here break.

64
00:03:34,200 --> 00:03:40,420
And if the ID is radio button two as you can see here in this content underlaid minute example the idea

65
00:03:40,440 --> 00:03:46,440
of this radio button here as you can see the idea of this radio button is actually radio button too.

66
00:03:46,470 --> 00:03:50,050
And here we have this radio button free and this radio button one.

67
00:03:50,070 --> 00:03:50,750
OK.

68
00:03:50,820 --> 00:03:55,500
So if the idea is that you get into then it's going to secure is this line of code here.

69
00:03:55,620 --> 00:03:56,250
OK.

70
00:03:56,250 --> 00:03:57,410
Our US is checked.

71
00:03:57,540 --> 00:03:58,240
OK.

72
00:03:58,260 --> 00:04:02,580
And if the idea is that you bought in free then it's going to you to execute this line of code here.

73
00:04:02,580 --> 00:04:03,160
OK.

74
00:04:03,390 --> 00:04:04,900
Windows Phone is checked.

75
00:04:05,100 --> 00:04:06,040
OK.

76
00:04:06,180 --> 00:04:07,950
So hopefully that makes sense.

77
00:04:08,070 --> 00:04:11,230
And now let's actually run our project and see what happens.

78
00:04:11,340 --> 00:04:15,240
So now as you can see our application is running on this emulator.

79
00:04:15,270 --> 00:04:18,030
And here if you scroll down here I can see these values.

80
00:04:18,060 --> 00:04:18,730
OK.

81
00:04:18,730 --> 00:04:19,420
Android or.

82
00:04:19,430 --> 00:04:19,750
Yes.

83
00:04:19,770 --> 00:04:23,830
So if I actually select this one here it says Android is checked OK.

84
00:04:24,000 --> 00:04:27,300
And if I actually select this I'll use you as is check the OK.

85
00:04:27,300 --> 00:04:31,040
And now as you can see we can only take one of these radio buttons here.

86
00:04:31,050 --> 00:04:31,590
OK.

87
00:04:31,770 --> 00:04:33,790
So here Windows Phone is checked.

88
00:04:33,990 --> 00:04:35,200
OK.

89
00:04:35,220 --> 00:04:38,330
So I think this this is enough for this application.

90
00:04:38,760 --> 00:04:43,740
And if you have any questions please post the discussion in the course and then I'll do my best to answer

91
00:04:43,800 --> 00:04:44,920
all of your questions.

92
00:04:45,090 --> 00:04:48,540
Thank you very much for watching and I'll see you in the next tutorial.

