1
00:00:00,890 --> 00:00:08,450
So as you can see here these are the lines of code that I paste that here and now I'm going to explain

2
00:00:08,450 --> 00:00:09,850
to you what's going on here.

3
00:00:09,860 --> 00:00:11,110
Exactly.

4
00:00:11,120 --> 00:00:16,900
So here as you can see this is actually our method and the access modifier of this method is public.

5
00:00:17,090 --> 00:00:23,480
The return type of this method is Voyt and the name of this method is modified cuius want.

6
00:00:23,530 --> 00:00:24,150
Right.

7
00:00:24,230 --> 00:00:31,340
And this method actually accepts an argument of type shared preferences and the name of this argument

8
00:00:31,370 --> 00:00:33,170
is shared preferences.

9
00:00:33,170 --> 00:00:33,850
Right.

10
00:00:33,890 --> 00:00:36,290
So what's the purpose of this method.

11
00:00:36,320 --> 00:00:43,320
This method is actually responsible for modifying the phones of the texts of the buttons of the guest

12
00:00:43,340 --> 00:00:43,970
buttons.

13
00:00:43,970 --> 00:00:47,390
So let me show you the emulator here.

14
00:00:47,390 --> 00:00:51,370
As you can see here if you just go inside these settings activity.

15
00:00:51,590 --> 00:00:55,950
Now as you can see we have this up this item here font for keys.

16
00:00:56,150 --> 00:00:58,180
Choose one of these fonts for quiz.

17
00:00:58,400 --> 00:01:04,760
And if I selected here now I can actually select one of these fonts for the text of the buttons that

18
00:01:04,760 --> 00:01:06,140
we have inside the Cooley's.

19
00:01:06,140 --> 00:01:11,470
So for example I can choose this one here and then I can actually click on back button here and now

20
00:01:11,480 --> 00:01:15,140
as you can see here the front of the button is now changed.

21
00:01:15,260 --> 00:01:18,460
Or I can actually select another font for example.

22
00:01:18,470 --> 00:01:24,470
Fauntleroy Blough I can select this one so as you can see here this is actually our radio group that

23
00:01:24,470 --> 00:01:26,800
contains these radio buttons right.

24
00:01:26,810 --> 00:01:28,750
This is actually the least preference.

25
00:01:28,970 --> 00:01:35,510
So let's actually select Fauntleroy Brown and then I can click on batch button here as you can see here.

26
00:01:35,510 --> 00:01:37,070
Now the font is changed.

27
00:01:37,100 --> 00:01:37,610
Right.

28
00:01:37,850 --> 00:01:42,650
So now let's actually look at this Meffert here.

29
00:01:42,800 --> 00:01:46,470
Let's go inside the curly braces of the Smurfit And let's see what's going on here.

30
00:01:46,490 --> 00:01:52,840
First of all in line number four hundred nineteen as you can see we have actually a variable of types

31
00:01:52,840 --> 00:01:53,250
3.

32
00:01:53,300 --> 00:01:53,860
Right.

33
00:01:54,050 --> 00:02:01,340
And the name of our valuable is format string value and then I put an assignment operator here and then

34
00:02:01,440 --> 00:02:09,080
you referred to the name of this argument shared preferences DOT gets strange right.

35
00:02:09,170 --> 00:02:10,840
Shared preferences that get strange.

36
00:02:10,880 --> 00:02:13,640
And for the first argument we need to pass the key.

37
00:02:13,760 --> 00:02:16,580
So the key is main activity that cuius for that.

38
00:02:16,670 --> 00:02:20,030
So let's actually go inside this main activity that of a file here.

39
00:02:20,180 --> 00:02:23,480
Let's go inside this class as you can see in line number 19.

40
00:02:23,480 --> 00:02:29,480
As you can see I created this constant here right which is after upstreams and the name of this constant

41
00:02:29,510 --> 00:02:37,040
is cuius underlined font slight assignment operator and this constant actually holds this key settings

42
00:02:37,090 --> 00:02:39,260
Underland keys underline font.

43
00:02:39,410 --> 00:02:46,070
And if I were actually going inside these quiz underline preferences that XML file as you can see we

44
00:02:46,070 --> 00:02:49,910
have actually this list three friends here.

45
00:02:50,060 --> 00:02:50,550
Right.

46
00:02:50,690 --> 00:02:55,420
So the entries is actually false at sign at a slash fonts.

47
00:02:55,430 --> 00:03:00,050
So let's actually hold the comments on our keyboard and if you are using a Windows machine just hold

48
00:03:00,110 --> 00:03:05,180
the control on your keyboard and then click on this right here and now as you can see here inside these

49
00:03:05,240 --> 00:03:09,100
areas that examen file we have this story out here.

50
00:03:09,140 --> 00:03:09,770
Right.

51
00:03:09,800 --> 00:03:11,670
So these are the entries.

52
00:03:11,930 --> 00:03:15,460
So these values are the values that are going to show to the user.

53
00:03:15,620 --> 00:03:17,830
So we have free items as you can see here.

54
00:03:17,830 --> 00:03:21,030
Let me actually show you the emulator as you can see.

55
00:03:21,290 --> 00:03:26,590
Now you can see that if I actually go inside the settings activity and then if I click on this front

56
00:03:26,630 --> 00:03:32,720
for for quiz item here as you can see these are the values that you are showing to the user the chunk

57
00:03:32,720 --> 00:03:36,700
for the Fauntleroy around the vonder bar them all right.

58
00:03:36,860 --> 00:03:40,390
So these are the values that you are going to show to the user.

59
00:03:40,730 --> 00:03:46,490
And now let's actually go back into our quiz the underline preferences that exemplified as you can see

60
00:03:46,490 --> 00:03:48,410
we have three values.

61
00:03:48,680 --> 00:03:52,510
So I'd say add a slash false underline values.

62
00:03:52,610 --> 00:03:55,710
So let's actually hold the here on our keyboard.

63
00:03:55,730 --> 00:03:57,950
And again if you are using a Windows machine.

64
00:03:57,950 --> 00:04:01,460
Just hold the control on your keyboard and then click on this value here.

65
00:04:01,460 --> 00:04:08,760
So we have this string arrow here light front underline values and we have these items here.

66
00:04:08,780 --> 00:04:13,840
So these are the actual values that you are going to work with from our job coats.

67
00:04:13,880 --> 00:04:19,210
These are the actual values that we are going to interact with from our job of course right chunk Fyffe

68
00:04:19,220 --> 00:04:24,510
that are T.F. Fauntleroy Blount the tity f wunderbar space.

69
00:04:24,600 --> 00:04:25,270
OTFE.

70
00:04:25,430 --> 00:04:29,320
So these are the name of the phones that we have inside our project.

71
00:04:29,330 --> 00:04:34,430
So now if I show you the structure of the project and if we actually to go inside these assets for that

72
00:04:34,670 --> 00:04:40,220
you can see that inside this phone directory inside this phone's folder we have these phones turn five

73
00:04:40,220 --> 00:04:45,540
that are T.F. Fauntleroy Brown the TGF wunderbar space them all that.

74
00:04:45,580 --> 00:04:52,860
All right so now let's actually go inside our quiz Underland preferences and file.

75
00:04:53,180 --> 00:04:59,320
And here you can see that the key for the key attribute I assigned this value settings underline quiz

76
00:04:59,380 --> 00:05:05,750
on the LEnfant And inside this main activity of a file you can see that recreated is constant and this

77
00:05:05,750 --> 00:05:10,390
constant actually holds the key here settings underline keys underline font.

78
00:05:10,490 --> 00:05:15,350
So whenever you want to actually first to is key I can just refer to this constant to the name of this

79
00:05:15,350 --> 00:05:16,080
constant.

80
00:05:16,190 --> 00:05:18,960
And then I can actually access this value right.

81
00:05:19,160 --> 00:05:23,880
So now let's actually go back inside our quiz underline preferences that is in my file.

82
00:05:24,080 --> 00:05:29,780
And that for the title form for Greece for the summary choose one of these phones for quiz and for the

83
00:05:29,790 --> 00:05:30,900
persistent attribute.

84
00:05:30,900 --> 00:05:36,220
Again I assigned the value of truth and the default value is actually at sidestream.

85
00:05:36,260 --> 00:05:38,240
Slash default underline front.

86
00:05:38,300 --> 00:05:40,080
So let's hold the commentary on a keyboard.

87
00:05:40,100 --> 00:05:44,310
And if you are using a Windows machine you just hold the control on your keyboard and then click on

88
00:05:44,390 --> 00:05:49,820
disvalue here and now as you can see here for the default font string source as you can see we have

89
00:05:49,820 --> 00:05:51,710
to hunt Fyffe that or T.F..

90
00:05:51,740 --> 00:05:58,280
So if the user doesn't want to actually change the font of the text of the buttons the default font

91
00:05:58,280 --> 00:05:59,790
is going to be this one chunk.

92
00:05:59,790 --> 00:06:00,780
5. What here.

93
00:06:01,010 --> 00:06:01,660
Right.

94
00:06:02,000 --> 00:06:05,140
So let's go back into our quiz Underland preferences that exemplified.

95
00:06:05,150 --> 00:06:09,160
And this is actually the least preference that you're going to interact with.

96
00:06:09,380 --> 00:06:15,260
So inside display an activity that a file we created this key here and now as you can see here we have

97
00:06:15,320 --> 00:06:21,800
also declared these forests these typeface typefaces valuable as you can see here the data type of these

98
00:06:21,800 --> 00:06:22,630
variables.

99
00:06:22,660 --> 00:06:24,830
It is actually the typeface right.

100
00:06:24,890 --> 00:06:31,490
So these variables can hold a difference that we have inside our project and inside inside the uncreate

101
00:06:31,760 --> 00:06:35,350
as you can see here are actually initialized these valuables.

102
00:06:35,400 --> 00:06:41,310
Channel 5 as you can see here and Fauntleroy Fauntleroy Brown and wonder about them all right.

103
00:06:41,570 --> 00:06:45,950
And now let's actually go inside our main activity BRAITMAN that of a file.

104
00:06:46,610 --> 00:06:51,830
And here you can see that we actually called this method shell inferences that gets trimmed and the

105
00:06:51,830 --> 00:06:52,780
plastic key.

106
00:06:52,910 --> 00:06:55,670
And for the default value you pass the value not right.

107
00:06:55,760 --> 00:07:02,690
So now we can actually get the specific font from this from the shared preferences by actually passing

108
00:07:02,690 --> 00:07:08,870
this key main activity that quizz underline font and you are actually assigning that value to this want

109
00:07:08,870 --> 00:07:11,450
something valuable valuable right.

110
00:07:11,490 --> 00:07:18,380
So now I actually created a switch statement in order to switch between the values of this fund string

111
00:07:18,380 --> 00:07:20,280
value as you can see here.

112
00:07:20,450 --> 00:07:24,940
So analysis actually going inside the curly braces of this front of this switch statement.

113
00:07:25,010 --> 00:07:26,350
And let's see what's going on here.

114
00:07:26,360 --> 00:07:27,110
Right.

115
00:07:27,170 --> 00:07:32,850
So here as you can see there the first look at this first case statement here.

116
00:07:32,960 --> 00:07:36,760
So we have case Chanoch five that here.

117
00:07:36,800 --> 00:07:44,270
So this means that if the value that is assigned to this Funston value is 205 or T.F. as you can see

118
00:07:44,270 --> 00:07:50,780
here we are actually switching between the values of these fonts thing you so case if the value of this

119
00:07:50,780 --> 00:07:59,740
fonts thing value is Chhun five that OTFE then it's going to actually execute this for Lapeer for linearly

120
00:07:59,750 --> 00:08:00,770
out row.

121
00:08:01,650 --> 00:08:07,860
And it's going to actually either right over the values of these IRA rules of spottiness in animal cuius

122
00:08:07,950 --> 00:08:09,380
as you can see here.

123
00:08:09,510 --> 00:08:10,270
Right.

124
00:08:10,380 --> 00:08:14,700
And then we have another for loop here inside this for a loop.

125
00:08:14,890 --> 00:08:17,870
So for Cullom zero.

126
00:08:17,880 --> 00:08:25,350
So let's look at the emulator here and now let's actually go back into our main activity as you can

127
00:08:25,350 --> 00:08:27,290
see here we have these rules here right.

128
00:08:27,300 --> 00:08:31,090
So if you want to either right over these rules here that we have in say the squeeze.

129
00:08:31,290 --> 00:08:32,850
So if we have two rows here.

130
00:08:32,850 --> 00:08:39,490
So we are actually iterating over the values of these three rows of spottiness in animalcules.

131
00:08:39,810 --> 00:08:45,000
And here we want to actually go inside these rows and we want to actually get the buttons.

132
00:08:45,030 --> 00:08:46,650
So for in column.

133
00:08:46,680 --> 00:08:52,950
So initially we assigned about zero to this column and we actually created a condition here that says

134
00:08:53,220 --> 00:08:59,160
until the value of this column variable is less than the value of the child count of this row.

135
00:08:59,310 --> 00:09:00,540
As you can see here.

136
00:09:00,600 --> 00:09:02,360
So here we have linearly right.

137
00:09:02,430 --> 00:09:04,320
So we can actually get the child count.

138
00:09:04,560 --> 00:09:10,140
And here I said that after each execution after each execution of this fall here is going to actually

139
00:09:10,350 --> 00:09:13,380
increment the value of this column by the way you Yvonne.

140
00:09:13,650 --> 00:09:16,250
And then it's going to go inside the curly braces of this for a loop.

141
00:09:16,350 --> 00:09:19,300
And now it's going to execute these two lines of code here first.

142
00:09:19,400 --> 00:09:27,750
It is actually saying that a button button assignment operator so button we're actually testing this

143
00:09:27,750 --> 00:09:32,290
object we button update the row that get child X column right.

144
00:09:32,310 --> 00:09:37,800
So we are actually getting that button that we have inside this first throw.

145
00:09:37,890 --> 00:09:40,300
So it's going to start to be the first throw.

146
00:09:40,320 --> 00:09:40,960
Right.

147
00:09:41,250 --> 00:09:43,760
And it's going to actually look at the column 0.

148
00:09:43,950 --> 00:09:44,480
Right.

149
00:09:44,490 --> 00:09:47,220
So the column 0 is this one the Spartan peacock.

150
00:09:47,370 --> 00:09:48,220
Right.

151
00:09:48,240 --> 00:09:52,840
And then as you can see here it's going to actually go inside this for a loop.

152
00:09:52,990 --> 00:09:55,130
First as you can see here it's going to get this spot in.

153
00:09:55,200 --> 00:09:55,700
Right.

154
00:09:55,860 --> 00:10:00,610
And then it's going to call the sniff at on this button button that set type face.

155
00:10:00,630 --> 00:10:06,970
Main activity that taunt that actually chunk five right so as you can see we have actually a typo.

156
00:10:07,170 --> 00:10:10,840
So let's actually go back inside our main activity out of a file.

157
00:10:11,230 --> 00:10:15,880
And now this actually changed its name to Chalk Talk five.

158
00:10:16,230 --> 00:10:19,280
And let's actually change this name also to hunt 5.

159
00:10:19,470 --> 00:10:20,830
As you can see here.

160
00:10:20,850 --> 00:10:26,040
So now let's go back into our main activity fragment that of our fight and here let's also changed his

161
00:10:26,040 --> 00:10:30,310
name to chant five and now the error is gone.

162
00:10:30,330 --> 00:10:31,020
Right.

163
00:10:31,110 --> 00:10:35,070
So now let's actually start from this case statement here.

164
00:10:35,070 --> 00:10:37,420
Again I want to actually explain to you what's going on here.

165
00:10:37,430 --> 00:10:37,770
Again.

