1
00:00:00,330 --> 00:00:05,460
So now I'm going to paste in a line of code here and then I'm going to explain to you what's going on

2
00:00:05,460 --> 00:00:06,140
here.

3
00:00:06,420 --> 00:00:10,180
So as you can see here this is the line of code that I pasted here.

4
00:00:10,200 --> 00:00:11,730
He asks the question number.

5
00:00:11,760 --> 00:00:18,570
So as you can see here I actually declare that DCX the question number here in line number 43 which

6
00:00:18,570 --> 00:00:19,460
is after it takes.

7
00:00:19,470 --> 00:00:22,990
And then I actually initialized that takes the question number.

8
00:00:22,990 --> 00:00:27,060
Here in line number seventy insight is uncreate view as you can see here.

9
00:00:27,060 --> 00:00:32,530
He asks the question question number and here you referred to the name of that variable.

10
00:00:32,530 --> 00:00:33,840
He asks the question number.

11
00:00:33,930 --> 00:00:35,000
That said text.

12
00:00:35,010 --> 00:00:41,340
So I want to set a text to this DXi question number and as you can see here we need to provide a string

13
00:00:41,340 --> 00:00:44,330
value for these set text Meffert.

14
00:00:44,340 --> 00:00:47,380
So I actually called jet stream method.

15
00:00:47,460 --> 00:00:48,730
As you can see here.

16
00:00:48,750 --> 00:00:54,660
So now if we actually hold the common key on my keyboard and then click on this string in effect here

17
00:00:54,960 --> 00:01:00,380
as you can see now as you can see it gets three Meffert is actually coming from these fragment that

18
00:01:00,420 --> 00:01:02,870
job a file here as you can see here.

19
00:01:02,880 --> 00:01:08,230
So we have this gets through the method and the return value of this method is actually osting value

20
00:01:08,340 --> 00:01:08,880
right.

21
00:01:09,060 --> 00:01:13,930
The return value is going to be of type string and it's going to give us a string value.

22
00:01:13,950 --> 00:01:17,150
Right that's the only job of this string method.

23
00:01:17,160 --> 00:01:23,340
So now if I if you want to you can actually look at the descriptions here and you will get.

24
00:01:23,340 --> 00:01:26,600
You will get an idea about this method.

25
00:01:26,790 --> 00:01:30,990
So let's actually close this file here and we have this thing.

26
00:01:31,030 --> 00:01:33,790
And this is if it actually accepts free arguments.

27
00:01:33,900 --> 00:01:37,410
So let's actually again hold the comment key on a keyboard.

28
00:01:37,410 --> 00:01:42,030
So if you are using a Windows machine hold the control on your keyboard and then click on it's getting

29
00:01:42,180 --> 00:01:42,700
it.

30
00:01:42,930 --> 00:01:46,330
And as you can see here this live it actually accepts some arguments.

31
00:01:46,410 --> 00:01:51,780
The first one is going to be to raise ID which is going to have be an integer.

32
00:01:51,780 --> 00:01:56,750
The second volley is going to be an array of values of type Object.

33
00:01:56,760 --> 00:01:59,760
So you already know about this at here.

34
00:02:00,360 --> 00:02:02,180
And as you can see here.

35
00:02:02,190 --> 00:02:08,120
So let's actually go back inside our main activity fragment that of a file and here as you can see I

36
00:02:08,110 --> 00:02:16,330
actually it's assigned this value as the first argument are thought to think that question on the length

37
00:02:16,350 --> 00:02:17,280
text.

38
00:02:17,280 --> 00:02:21,580
So now let's actually go inside our strings that exemplify.

39
00:02:21,600 --> 00:02:25,440
So now let me show you the structure are the structure of our project.

40
00:02:25,440 --> 00:02:33,150
So that's really kind of view to Lindows and we can project and here DoubleClick and this app folder

41
00:02:33,150 --> 00:02:36,280
here and then DoubleClick and this arrest folder.

42
00:02:36,510 --> 00:02:38,820
And he has definitely shown these values for there.

43
00:02:38,850 --> 00:02:45,230
And then this strength that exemplified so inside these strings that them fight as you can see here

44
00:02:45,240 --> 00:02:48,370
we have this question underlying text string resource.

45
00:02:48,390 --> 00:02:56,980
As you can see here and it says this is animal pearlescent one dollar sign d of person two dollar sign.

46
00:02:57,120 --> 00:03:01,150
So I already told you about these these formats.

47
00:03:01,270 --> 00:03:06,390
This one is going to be the first argument and this one is going to be the second argument.

48
00:03:06,540 --> 00:03:07,260
Right.

49
00:03:07,260 --> 00:03:10,940
So now if I go back and say this me an active man activity fragment here.

50
00:03:10,980 --> 00:03:17,550
So for the first argument as you can see here of this string Merfeld for the first argument of of this

51
00:03:17,550 --> 00:03:20,320
gets string Meffert we need to provide this Thring resource.

52
00:03:20,400 --> 00:03:25,320
So this resource is going to be that stringless source that we have inside studies things that exemplify

53
00:03:25,530 --> 00:03:26,990
question underlying text.

54
00:03:27,030 --> 00:03:31,050
So our thought streams that question underlying text.

55
00:03:31,050 --> 00:03:31,800
Right.

56
00:03:31,830 --> 00:03:38,230
So for the second argument of this gets Thring Mefford as you can see here we have number one.

57
00:03:38,370 --> 00:03:41,360
So what does this number one refer to.

58
00:03:41,580 --> 00:03:47,370
So if we go back inside these strings that exemplified as you can see here I told you that this format

59
00:03:47,370 --> 00:03:54,060
here this dollars these are percent one dollar Sainty is going to be the first argument of these text

60
00:03:54,060 --> 00:03:54,780
value.

61
00:03:55,200 --> 00:03:59,190
And this per cent two dollar sign is going to be the second argument.

62
00:03:59,400 --> 00:04:04,140
So insanity's gets three Meffert inside this main activity affreightment out of a file.

63
00:04:04,230 --> 00:04:09,570
When I assigned the value number one here for the second argument of this string method I said that

64
00:04:09,570 --> 00:04:15,730
this number one is going to be in place of this person to $1 Sainty.

65
00:04:16,040 --> 00:04:16,650
Right.

66
00:04:16,710 --> 00:04:18,130
That is going to be number one here.

67
00:04:18,180 --> 00:04:21,120
Football is about my number one of.

68
00:04:21,450 --> 00:04:23,060
And then it is actually to go back inside.

69
00:04:23,070 --> 00:04:28,320
Our main activity fragment out of a fight here number of animals included increase.

70
00:04:28,380 --> 00:04:36,330
So here inside our Java file as you can see at the top inside Isman activity placement class I actually

71
00:04:36,330 --> 00:04:42,570
created a constant here and I said that that number of animals included included in the quiz which is

72
00:04:42,570 --> 00:04:43,230
number 10.

73
00:04:43,350 --> 00:04:49,570
So we're going to have 10 animals inside Ahlquist So why did I actually put number one here.

74
00:04:49,620 --> 00:04:56,220
As you can see because as you can see here inside this uncreate view for the first time that our application

75
00:04:56,220 --> 00:04:59,550
is actually started disvalue is going to be number one here.

76
00:04:59,550 --> 00:05:04,050
So for example let me show you the emulator as you can see it says this is my number one of 10.

77
00:05:04,050 --> 00:05:12,620
So let me close this application let me close these applications here and now if I actually open this

78
00:05:12,620 --> 00:05:19,040
application here again as you can see again just for the first time that for the first time that this

79
00:05:19,040 --> 00:05:22,470
application is actually started as you can see it says this is LMI number one.

80
00:05:22,490 --> 00:05:26,170
So this rally you always should be one.

81
00:05:26,210 --> 00:05:32,730
So that's why I actually put number one here and this number one is going to be in place of that first

82
00:05:32,790 --> 00:05:39,850
argument that we have here first at this present one dollar sign.

83
00:05:40,290 --> 00:05:45,240
So number one and for the sake of argument we have this number of animals included in inquiries.

84
00:05:45,270 --> 00:05:49,870
So here we have 10 animals as you can see here at the top I specified that we have.

85
00:05:50,010 --> 00:05:53,790
We are going to have ten animals inside our quiz right.

86
00:05:53,940 --> 00:05:56,060
So hopefully that makes sense.

87
00:05:56,220 --> 00:05:59,460
And now you get the idea of that of that formatting.

88
00:05:59,490 --> 00:05:59,940
Right.

89
00:05:59,940 --> 00:06:03,230
First I actually called this object.

90
00:06:03,490 --> 00:06:05,430
The question number that said text.

91
00:06:05,520 --> 00:06:09,840
And then I called this method that we get from the fragment class get strange.

92
00:06:10,020 --> 00:06:14,760
And and as you can see here for the first argument we need to refer to that string the source for the

93
00:06:14,760 --> 00:06:15,510
second argument.

94
00:06:15,540 --> 00:06:19,370
But we are going to specify the first argument of that single source.

95
00:06:19,380 --> 00:06:22,760
As you can see here is a person one dollar sign D.

96
00:06:23,070 --> 00:06:27,510
And for the second argument as against the number of animals including increase this value is going

97
00:06:27,510 --> 00:06:33,180
to be in place of actually this value per cent two dollar sign.

98
00:06:33,510 --> 00:06:38,560
So now you get the idea and hopefully that makes sense.

99
00:06:38,880 --> 00:06:47,150
And now I can just type in here return if you as you can see here.

100
00:06:47,200 --> 00:06:51,270
This uncreate view Meffert needs to return a value of type view.

101
00:06:51,310 --> 00:06:51,990
Right.

102
00:06:52,060 --> 00:06:54,100
So here we created this view here.

103
00:06:54,130 --> 00:06:55,980
And B has done actually.

104
00:06:56,380 --> 00:07:01,350
And we actually worked on that view and we used this if you object here.

105
00:07:01,540 --> 00:07:04,620
And then finally we need to retain this view from the Smurfette.

106
00:07:04,630 --> 00:07:05,910
This is very important.

107
00:07:06,310 --> 00:07:12,130
And now what we are going to do if we're going to ask you to create a listener APTN guest listener here

108
00:07:12,160 --> 00:07:14,780
inside our our class.

109
00:07:14,890 --> 00:07:21,190
So before the end in curly brace of this class here as you can see before the end in calibers of this

110
00:07:21,190 --> 00:07:26,350
main activity frypan class I am going to pasting some more lines of code here and then I'm going to

111
00:07:26,350 --> 00:07:28,850
explain to you what's going on here.

