1
00:00:00,330 --> 00:00:04,710
So as you can see here now our application is running on this emulator.

2
00:00:04,740 --> 00:00:12,030
So if I click on these menu button and then the settings and here if I scroll down now I want to actually

3
00:00:12,030 --> 00:00:14,150
choose this one to you.

4
00:00:14,160 --> 00:00:19,380
So I just need to check the checkbox and then unchecked checkbox and then if I actually come back in

5
00:00:19,380 --> 00:00:20,100
here.

6
00:00:20,130 --> 00:00:23,270
Now as you can see nothing happened and this takes you.

7
00:00:23,460 --> 00:00:25,370
So what's the problem here.

8
00:00:25,800 --> 00:00:28,270
Let's see what's the problem this time.

9
00:00:28,590 --> 00:00:34,810
And here as you can see we didn't actually called this method from the andr's your method.

10
00:00:34,920 --> 00:00:39,780
So as you can see here in our main activity class I actually all right at this andr's your method.

11
00:00:40,230 --> 00:00:48,380
And inside this regime if we need to actually call the Smurfette specify the format for text view free

12
00:00:48,560 --> 00:00:48,950
OK.

13
00:00:48,960 --> 00:00:55,530
We need to call this method so that it can actually execute this method of this on you if it is called

14
00:00:56,040 --> 00:00:57,970
in our Android lifecycle OK.

15
00:00:58,200 --> 00:01:01,620
So let's run our project again and see what happens.

16
00:01:01,620 --> 00:01:07,440
So now as you can see our application is running on the simulator and here you are in the unredeemed

17
00:01:07,440 --> 00:01:08,240
state.

18
00:01:08,430 --> 00:01:11,730
In our application and this is the text number for you right.

19
00:01:11,730 --> 00:01:14,800
And as you can see the front of this text view is actually changed.

20
00:01:14,970 --> 00:01:18,080
So if I click on this menu button here settings.

21
00:01:18,210 --> 00:01:24,000
Now as you can see if they actually uncheck this checkbox and check the checkbox here and then click

22
00:01:24,000 --> 00:01:25,370
click on back button here.

23
00:01:25,380 --> 00:01:28,410
Now as you can see the font of this text view is actually changed.

24
00:01:28,530 --> 00:01:35,190
And here again if I click on the menu button settings and if I scroll down here and now if I unchecked

25
00:01:35,190 --> 00:01:39,420
this checkbox and check this checkbox here and then click on back button here.

26
00:01:39,420 --> 00:01:43,460
Now again as you can see the front of this takes you is actually changed.

27
00:01:43,470 --> 00:01:49,050
OK so now I think that's enough for these fonts.

28
00:01:49,170 --> 00:01:52,080
But here I want to actually specify the size of this form.

29
00:01:52,110 --> 00:01:55,390
OK so if I actually just select this one here.

30
00:01:55,410 --> 00:02:00,360
Now I want to actually for example select this here and if I click on Patch button here I want to actually

31
00:02:00,360 --> 00:02:03,480
for example set the size of this one to 50.

32
00:02:03,500 --> 00:02:09,690
OK so what should I do now we need to actually put the logic for our sizes.

33
00:02:09,720 --> 00:02:10,170
OK.

34
00:02:10,290 --> 00:02:15,900
After this the ending curly brace of this Meffert specify the form to four takes you free.

35
00:02:15,920 --> 00:02:21,080
I want to actually pasting some more efforts here inside our main activity class.

36
00:02:21,090 --> 00:02:21,630
OK.

37
00:02:21,840 --> 00:02:28,260
So as you can see here these are lines of code that I actually pasted here inside this main activity

38
00:02:28,260 --> 00:02:29,030
class.

39
00:02:29,070 --> 00:02:30,720
This is actually MFL right.

40
00:02:30,750 --> 00:02:33,750
So the access modifier of this method is public.

41
00:02:33,810 --> 00:02:36,280
The return type of this method is void.

42
00:02:36,300 --> 00:02:38,960
So this means that this method is going to return nothing.

43
00:02:39,330 --> 00:02:43,950
And the name of this method is specify the size for text view 1.

44
00:02:44,040 --> 00:02:44,570
OK.

45
00:02:44,760 --> 00:02:45,740
As you can see here.

46
00:02:45,930 --> 00:02:47,570
So now as you can see this is.

47
00:02:47,730 --> 00:02:51,960
Now we are inside the Smurfette right inside the curly braces of the Smurfette.

48
00:02:51,960 --> 00:02:58,110
And first of all I actually referred to the name of this strange variable that I created inside this

49
00:02:58,110 --> 00:03:01,440
class inside this man with the glass he had as you can see.

50
00:03:01,440 --> 00:03:06,930
This is our main activity class and at the top of this class I created these string variables as you

51
00:03:06,930 --> 00:03:07,670
can see here.

52
00:03:07,830 --> 00:03:12,780
I just declared these these valuables as you can see in line eight I created.

53
00:03:12,780 --> 00:03:18,330
They actually declared this string valuable the data type of this variable is strange and the name of

54
00:03:18,330 --> 00:03:21,360
this where the above is takes you one size.

55
00:03:21,360 --> 00:03:27,960
So this variable is going to hold the size of the text view that you want to actually for example choose

56
00:03:28,290 --> 00:03:29,310
for my text view.

57
00:03:29,340 --> 00:03:36,100
So as you can see here inside these preferences underline file that examine as you can see for example.

58
00:03:36,600 --> 00:03:38,580
Let me actually close this a preview here.

59
00:03:38,760 --> 00:03:44,260
For example as you can see here we have these list preference here for every preference category.

60
00:03:44,310 --> 00:03:44,760
OK.

61
00:03:44,850 --> 00:03:47,440
We have this list of preference inside that.

62
00:03:47,480 --> 00:03:52,200
So this prevents category as you can see we have this list proofer hands.

63
00:03:52,710 --> 00:03:55,470
And as you can see here we have Titel.

64
00:03:55,500 --> 00:03:58,510
And these are the entries and entry values.

65
00:03:58,620 --> 00:04:02,110
And as you can see here these values are actually strained values.

66
00:04:02,160 --> 00:04:06,750
Remember font size and the font size values are actually string values.

67
00:04:06,750 --> 00:04:13,280
So inside these things that example here as you can see I have these rays of string values.

68
00:04:13,440 --> 00:04:17,780
So we need to actually hold these values as a string value.

69
00:04:17,790 --> 00:04:23,910
So that's why at inside this mean I computed a double file inside this main activity class I actually

70
00:04:23,910 --> 00:04:30,780
declared these three variables in order to hold those values the values of the textbooks for example

71
00:04:30,840 --> 00:04:32,340
for the text you want size.

72
00:04:32,550 --> 00:04:40,510
I want you to hold those values that these values for example 25 40 45 50 55 60 65 and 70.

73
00:04:40,650 --> 00:04:41,360
OK.

74
00:04:41,640 --> 00:04:44,670
So that's what I actually did declare these variables.

75
00:04:44,670 --> 00:04:48,920
So now let's go inside our Mefford specify the size of four text view one.

76
00:04:48,930 --> 00:04:50,300
So this is RMF right.

77
00:04:50,310 --> 00:04:54,530
So are you referred to the name of that valuable assignment operator.

78
00:04:54,780 --> 00:04:57,570
So here this is our shared preferences object.

79
00:04:57,570 --> 00:05:01,460
So this object actually holds all the data that we actually see.

80
00:05:01,850 --> 00:05:04,370
And now we can actually retrieve those data.

81
00:05:04,370 --> 00:05:08,880
So remember when we actually created these preferences Underland follow the example.

82
00:05:09,020 --> 00:05:13,070
You are actually saving some data to our application.

83
00:05:13,210 --> 00:05:18,770
OK so this preference activity that I will find here we are adding that preferences to our application

84
00:05:18,830 --> 00:05:23,010
at preferences from resource are that SML.

85
00:05:23,010 --> 00:05:28,820
So remember inside a directory called exemple as you can see here we have these preferences on the loan

86
00:05:29,030 --> 00:05:31,380
file that XML here as you can see.

87
00:05:31,550 --> 00:05:32,030
OK.

88
00:05:32,180 --> 00:05:35,240
So we have this information in our application.

89
00:05:35,330 --> 00:05:40,080
Now inside the Smain I think declasse we just we just need to get those informations right.

90
00:05:40,190 --> 00:05:43,310
So shared preferences that get strange.

91
00:05:43,310 --> 00:05:45,330
So now you want to get a string value right.

92
00:05:45,500 --> 00:05:47,420
Font size text 1.

93
00:05:47,510 --> 00:05:48,830
So this is actually right.

94
00:05:48,830 --> 00:05:52,590
So let's go inside these preferences underline find that example here.

95
00:05:52,760 --> 00:05:59,750
As you can see here for for example for the first preference category here takes a number of settings

96
00:05:59,750 --> 00:06:00,260
right.

97
00:06:00,260 --> 00:06:02,080
We have a list of friends here.

98
00:06:02,170 --> 00:06:08,300
OK this is a list proof France that is inside of these specific proofer in this category and its title

99
00:06:08,300 --> 00:06:10,190
is text number 1 settings.

100
00:06:10,190 --> 00:06:11,190
So this is the settings.

101
00:06:11,210 --> 00:06:13,220
These are the settings of the text number one.

102
00:06:13,280 --> 00:06:17,430
And now we can actually specify the text size of our text view.

103
00:06:17,450 --> 00:06:17,930
OK.

104
00:06:18,080 --> 00:06:22,550
So lispro France and the key is font size text 1.

105
00:06:22,750 --> 00:06:23,780
OK.

106
00:06:23,810 --> 00:06:29,310
And these are the values these are the values for this list proofer and specifies the size of your phone

107
00:06:29,370 --> 00:06:34,430
for text you want choose one of the sizes and other values font sizes font size values and the default

108
00:06:34,430 --> 00:06:36,440
value is for example Number 10 right.

109
00:06:36,440 --> 00:06:38,810
So as you can see here this is the key.

110
00:06:39,050 --> 00:06:43,600
So Vinita refer to this key in order to access this list preference.

111
00:06:43,610 --> 00:06:52,190
So inside this main activity class I the same team shared preferences that get streamed fault size takes

112
00:06:52,270 --> 00:06:52,780
on.

113
00:06:52,790 --> 00:06:56,680
So now actual access to the list friends the radio buttons.

114
00:06:56,750 --> 00:06:57,480
OK.

115
00:06:58,010 --> 00:07:00,160
And this is the default value number 20.

116
00:07:00,170 --> 00:07:06,190
This is the default value that is going to be chosen for our for example text size.

117
00:07:06,200 --> 00:07:07,070
Right.

118
00:07:07,070 --> 00:07:09,290
We need to put a default value here.

119
00:07:09,560 --> 00:07:14,570
And as you can see here in line here in line one hundred and sixty three I just need to refer to the

120
00:07:14,570 --> 00:07:18,440
name of Arctic's a number of anti-X the text number one object.

121
00:07:18,440 --> 00:07:19,020
OK.

122
00:07:19,270 --> 00:07:21,310
Data set text size.

123
00:07:21,440 --> 00:07:26,190
Here I am actually specifying the size of our takes you right said text size.

124
00:07:26,210 --> 00:07:31,100
This is a Meffert that actually determines what it's going to be the size of our text view.

125
00:07:31,100 --> 00:07:34,840
So the takes number one that takes that said text size.

126
00:07:34,970 --> 00:07:41,890
So because you are actually getting these values as you can see here these numbers as a string value

127
00:07:41,900 --> 00:07:49,410
inside an array as you can see here we need to actually convert that values to a float value.

128
00:07:49,670 --> 00:07:54,310
So we have to we need to actually refer to the name of the floor class.

129
00:07:54,410 --> 00:07:56,930
So float capital F this is very important.

130
00:07:56,930 --> 00:08:01,060
This is actually a class right float that parse float.

131
00:08:01,070 --> 00:08:07,370
So this this is actually the static method inside this Floras class and it's going to actually convert

132
00:08:07,960 --> 00:08:11,230
a value that is of types to a value of type float.

133
00:08:11,270 --> 00:08:11,800
OK.

134
00:08:11,960 --> 00:08:13,930
Takes you want size.

135
00:08:14,330 --> 00:08:14,840
OK.

136
00:08:14,840 --> 00:08:19,170
So in this way we can actually specify the size of our Takes view.

137
00:08:19,490 --> 00:08:25,340
So now inside this and resume effort that we actually created here be overrated here.

138
00:08:25,450 --> 00:08:31,430
I just need to refresh the name of that pivot specify this size for text view 1.

139
00:08:31,670 --> 00:08:34,910
So now let's run our project and see what happens.

140
00:08:34,910 --> 00:08:38,660
So now as you can see the size of our takes view changed.

141
00:08:38,660 --> 00:08:42,350
So as you can see here this is our first text view right.

142
00:08:42,410 --> 00:08:47,660
So if I click on this manual button and then settings and here as you can see I have this option here

143
00:08:47,660 --> 00:08:51,280
to specify the size of your phone's for text view one right.

144
00:08:51,290 --> 00:08:56,830
So I just need to click on it and as you can see here I can actually choose one of these sizes.

145
00:08:56,840 --> 00:08:58,530
For example 70.

146
00:08:59,170 --> 00:09:05,060
And now let's actually click on dispatch button here and now the resume if it is called and the size

147
00:09:05,120 --> 00:09:07,410
of this text is actually changed.

148
00:09:07,780 --> 00:09:14,640
OK so now let's actually add the other efforts for the other text to use for others takes use here.

149
00:09:14,650 --> 00:09:21,180
OK so now here after the end in calibrates of this Meffert space specified the size for text you want

150
00:09:21,540 --> 00:09:24,120
I want I should add one one one more method here.

151
00:09:24,190 --> 00:09:27,590
So as you can see here this is the Meffert that I actually pasted here.

152
00:09:27,730 --> 00:09:31,080
And as you can see here the access modifier of this method is public.

153
00:09:31,210 --> 00:09:37,030
The return type of this if it is void and the name of this method is specified the size for text.

154
00:09:37,030 --> 00:09:38,330
Butu right.

155
00:09:38,590 --> 00:09:41,720
So now I am actually inside the Smurfit.

156
00:09:41,800 --> 00:09:48,000
First of all I referred to the name of this variable that I actually declared inside the main activity

157
00:09:48,010 --> 00:09:48,340
class.

158
00:09:48,340 --> 00:09:49,620
This is already about right.

159
00:09:49,660 --> 00:09:52,120
Strange takes two takes you to size.

160
00:09:52,150 --> 00:09:58,270
So this variable is going to hold these these string values these numbers that are actually given to

161
00:09:58,270 --> 00:10:01,210
us as a string value as you can see here string array.

162
00:10:01,210 --> 00:10:02,100
Right.

163
00:10:02,170 --> 00:10:09,040
So inside this main activity class as you can see here and inside of our Meffert specify the size photosphere

164
00:10:09,040 --> 00:10:14,680
to I actually referred to the name of that idea of an assignment operator.

165
00:10:14,800 --> 00:10:20,770
Again I refer to the name of this object Scheldt preferences in order to get the values inside our preferences

166
00:10:20,770 --> 00:10:24,190
on the follow the example that get strained.

167
00:10:24,310 --> 00:10:25,180
So this is the key.

168
00:10:25,180 --> 00:10:27,000
The first argument is going to be the key.

169
00:10:27,260 --> 00:10:27,660
OK.

170
00:10:27,790 --> 00:10:30,070
Font size takes two.

171
00:10:30,490 --> 00:10:34,720
So this key is inside these preferences underline underlined that examine and as you can see here we

172
00:10:34,720 --> 00:10:38,990
have another approver in this category as you can see text number two settings.

173
00:10:39,250 --> 00:10:43,150
And inside this preference Katic what we have this list preference.

174
00:10:43,150 --> 00:10:44,170
Right.

175
00:10:44,170 --> 00:10:46,910
And the key is font size takes two.

176
00:10:47,050 --> 00:10:47,650
Right.

177
00:10:47,650 --> 00:10:54,100
So if you need to actually refer to the name of this key to this key in order to access these values

178
00:10:54,100 --> 00:10:55,680
the font size is values.

179
00:10:55,690 --> 00:11:02,380
So inside this main activity class and inside the Smurfette I just referred to this key font size takes

180
00:11:02,390 --> 00:11:04,380
two and this is going to be a default value.

181
00:11:04,380 --> 00:11:05,780
For example number 20.

182
00:11:05,980 --> 00:11:06,750
OK.

183
00:11:07,090 --> 00:11:11,770
It doesn't really matter what value you put here because at the end you will naturally choose a font

184
00:11:11,770 --> 00:11:13,300
for your text view.

185
00:11:13,300 --> 00:11:19,820
Right because those values are actually inside some radio buttons.

186
00:11:19,840 --> 00:11:22,620
We have a list list of radio buttons.

187
00:11:22,630 --> 00:11:31,290
OK so we need to choose one of them and here as you can see in line 172 as you can see here I referred

188
00:11:31,510 --> 00:11:34,420
to the name of this to the text number two.

189
00:11:34,560 --> 00:11:35,140
Right.

190
00:11:35,140 --> 00:11:37,650
We have these text in our class right.

191
00:11:37,760 --> 00:11:40,270
TXI the text number to set text size.

192
00:11:40,300 --> 00:11:43,730
So here I want to set the text size of our text view.

193
00:11:43,930 --> 00:11:51,070
So again because we received these values those values of the text sizes as a string value we need to

194
00:11:51,070 --> 00:11:57,730
actually convert those values to a float value in order to assign those values to our to take size of

195
00:11:57,730 --> 00:11:58,240
our take.

196
00:11:58,270 --> 00:11:59,490
DXi takes number two.

197
00:11:59,660 --> 00:12:02,560
So float that parse float.

198
00:12:02,560 --> 00:12:07,060
And we need to put the string value text view to size as you can see here.

199
00:12:07,060 --> 00:12:10,940
So now let's actually run our project and see what happens.

200
00:12:11,080 --> 00:12:17,320
So now as you can see our application is running on this emulator here and now and when I truly click

201
00:12:17,320 --> 00:12:22,600
on this menu bottom settings and then I'm going to change the settings of the text number to say things

202
00:12:22,600 --> 00:12:23,580
right here.

203
00:12:23,590 --> 00:12:27,700
Here we are inside these preference Cretic of these text number two settings.

204
00:12:27,700 --> 00:12:28,870
This is the title.

205
00:12:29,110 --> 00:12:37,540
And here I have this option again specify the size of your fonts for text butu and here I can introduce

206
00:12:37,570 --> 00:12:45,370
for example select this 60 here and if I come back here back in here now as you can see the effects

207
00:12:45,460 --> 00:12:48,040
are not actually happening here.

208
00:12:48,040 --> 00:12:48,720
Why.

209
00:12:48,910 --> 00:12:57,050
Because inside this andr's your Mefford we didn't call that Meffert we didn't call these specify the

210
00:12:57,070 --> 00:13:04,420
size for text view to specify the size for text butu we need to call this Meffert insight is Arzu method

211
00:13:04,840 --> 00:13:11,440
in order to change changes to take effect in our main exemplified here in our main activity.

212
00:13:11,830 --> 00:13:15,180
Otherwise we cannot actually see those changes.

213
00:13:15,250 --> 00:13:21,100
We need to call that movement on this resume effect which is a method that is part of the Android lifecycle.

214
00:13:21,140 --> 00:13:21,900
OK.

215
00:13:21,940 --> 00:13:26,920
So so that these are changes that are inside of this method is going to happen.

216
00:13:27,010 --> 00:13:27,930
Right.

217
00:13:27,940 --> 00:13:29,570
So let's run our project again.

