1
00:00:00,780 --> 00:00:04,480
So now as you can see our application is running on the simulator.

2
00:00:04,620 --> 00:00:11,100
So now I want to actually click on this menu button settings and here as you can see we have some additional

3
00:00:11,160 --> 00:00:12,090
options.

4
00:00:12,090 --> 00:00:13,800
Text Number two settings.

5
00:00:13,800 --> 00:00:17,080
So these are the settings for text number to text view.

6
00:00:17,130 --> 00:00:19,900
So if I actually checked this checkbox here for this form.

7
00:00:19,930 --> 00:00:22,970
Chunk 5 this is another one right.

8
00:00:22,990 --> 00:00:26,450
And now if I click on Patch button here let's see what happens.

9
00:00:26,640 --> 00:00:29,330
And as you can see here nothing happened here.

10
00:00:29,520 --> 00:00:31,060
So there must be a problem.

11
00:00:31,320 --> 00:00:31,810
OK.

12
00:00:32,040 --> 00:00:38,270
So let's actually go back to our Meffert specify the format for takes you to.

13
00:00:38,340 --> 00:00:41,800
There is a problem here and we need to fix that fix that problem.

14
00:00:42,030 --> 00:00:46,200
And as you can see here inside our Meffert specified the font for text view to it there is a problem

15
00:00:46,200 --> 00:00:46,890
here.

16
00:00:46,920 --> 00:00:49,590
THC takes number one and this is wrong.

17
00:00:49,790 --> 00:00:53,990
Finitude said the typeface Forty-Eight it takes number two.

18
00:00:54,130 --> 00:00:57,190
Again we made the same mistake here.

19
00:00:57,270 --> 00:01:04,740
So remember that this sitting here these are the settings these are the checkboxes that are related

20
00:01:04,800 --> 00:01:07,240
only to these takes butu.

21
00:01:07,380 --> 00:01:12,570
So here we need to is actually referred to the name of our text.

22
00:01:12,640 --> 00:01:14,630
It takes number two.

23
00:01:14,910 --> 00:01:18,310
And here again here is the text number two.

24
00:01:18,750 --> 00:01:23,290
So remember THC takes number two THC takes number two and THC takes number two.

25
00:01:23,310 --> 00:01:24,330
Right.

26
00:01:24,330 --> 00:01:29,280
So here we are we are to actually set the typeface for these takes view only.

27
00:01:29,460 --> 00:01:31,280
So let's run our project again.

28
00:01:32,380 --> 00:01:36,370
So this is a common mistakes mistake that are always students make.

29
00:01:36,370 --> 00:01:41,500
And here I wanted to actually show you not to actually make this mistake here.

30
00:01:41,860 --> 00:01:47,170
So as you can see here our application is running on this emulator here and it says and as you can see

31
00:01:47,350 --> 00:01:50,080
the front of our face is now changed.

32
00:01:50,260 --> 00:01:55,390
So if I click on these settings here now you can see these fonts here.

33
00:01:55,480 --> 00:02:01,220
So if I unchecked this checkbox and check the search box here and if I click on back button here.

34
00:02:01,270 --> 00:02:06,170
Now here you can see that the front of this takes view only is changed.

35
00:02:06,340 --> 00:02:12,730
So if I click on the settings again here and now if I actually uncheck this checkbox and check the search

36
00:02:12,730 --> 00:02:16,740
box here for this first form and if I click on back here.

37
00:02:16,870 --> 00:02:20,750
Now as you can see the front of our text view is now changed.

38
00:02:20,770 --> 00:02:21,790
Right.

39
00:02:21,790 --> 00:02:25,150
So let's change this form to the first one.

40
00:02:25,150 --> 00:02:29,270
So let's check this one and check this checkbox here.

41
00:02:29,410 --> 00:02:30,430
So if I click on back.

42
00:02:30,460 --> 00:02:33,940
Now as you can see the front of this takes you is now changed.

43
00:02:33,940 --> 00:02:37,430
So now let's actually put the logic for our fair take takes view.

44
00:02:37,630 --> 00:02:41,400
So let's go back to our preferences underlined find that example here.

45
00:02:41,620 --> 00:02:49,120
After the ending tag of this preference category here I want to I try to add another preference category

46
00:02:49,120 --> 00:02:51,870
here inside our preferred screen.

47
00:02:51,880 --> 00:02:57,100
Remember here we need to add some other lines of code so I'm going to paste in some more lines of code

48
00:02:57,100 --> 00:03:01,220
here and then I'm going to explain explain to you what's going on here.

49
00:03:01,240 --> 00:03:06,180
So as you can see here these are the lines of code that I actually pasted here.

50
00:03:06,220 --> 00:03:12,540
I have another prevents category and the title of this category is text number fli settings.

51
00:03:12,580 --> 00:03:13,150
OK.

52
00:03:13,360 --> 00:03:17,730
And again the first checkbox is this one checkbox for number of.

53
00:03:17,730 --> 00:03:20,110
Fun for text free.

54
00:03:20,110 --> 00:03:24,520
Here we want to actually set the typeface to set the font for our text feel free OK.

55
00:03:24,910 --> 00:03:27,200
And the title again is Cheick chunk 5.

56
00:03:27,220 --> 00:03:29,480
The summary is this is 4 to number one.

57
00:03:29,560 --> 00:03:33,470
And as you can see the default value is this one the name of this font.

58
00:03:33,650 --> 00:03:39,540
And here we are actually ending this checkbox for reference pre-feminist with this ending tag.

59
00:03:40,000 --> 00:03:43,260
And here as you can see we have this checkbox preference again.

60
00:03:43,600 --> 00:03:45,310
And the key is checkbox.

61
00:03:45,340 --> 00:03:48,890
Number two for takes free as you can see here checkbox font.

62
00:03:48,900 --> 00:03:54,710
Number two tastefully the title is Fauntleroy Brown and the summary is.

63
00:03:54,820 --> 00:03:56,750
This is a phone number two.

64
00:03:56,830 --> 00:04:00,580
And here the default value is Fauntleroy Brown here.

65
00:04:00,760 --> 00:04:01,360
OK.

66
00:04:01,750 --> 00:04:06,290
And here we have this checkbox preference again for our first form.

67
00:04:06,370 --> 00:04:12,130
As you can see here checkbox with number of the title is wrong as you can see I don't want to use this

68
00:04:12,130 --> 00:04:12,390
font.

69
00:04:12,390 --> 00:04:16,710
I want to use the word font that I have in my project structure.

70
00:04:16,810 --> 00:04:21,910
So as you can see here in my present structure I don't want to use this one the project.

71
00:04:21,910 --> 00:04:23,540
I just want to use the Android.

72
00:04:23,600 --> 00:04:26,830
OK so just select this section here.

73
00:04:26,830 --> 00:04:29,470
Select it and now select these.

74
00:04:29,540 --> 00:04:32,780
And right now I can see my project structure better.

75
00:04:32,800 --> 00:04:33,560
OK.

76
00:04:34,000 --> 00:04:40,400
And as you can see here inside these assets Walder and inside this directory fonts directed here.

77
00:04:40,630 --> 00:04:41,930
I want to use this one.

78
00:04:41,930 --> 00:04:45,820
This the name of this friend form wunderbar space them.

79
00:04:45,940 --> 00:04:48,920
So I just need to delete this title here.

80
00:04:49,030 --> 00:04:59,460
I just need to delete this a title here and I can just type in vonder bar space or dot or T.F. right.

81
00:04:59,560 --> 00:05:01,590
And the summary is this is for number three.

82
00:05:01,600 --> 00:05:03,880
And again the default value is wrong.

83
00:05:03,910 --> 00:05:13,150
I just need to type Typee wander bar space or dot or T.F..

84
00:05:13,360 --> 00:05:14,710
Right.

85
00:05:14,710 --> 00:05:21,580
So now as you can see this is our first checkbox preference and here we have these lists pretty France

86
00:05:21,610 --> 00:05:26,030
as you can see here the Andretti's font size takes free.

87
00:05:26,050 --> 00:05:29,930
The total is the size of your phone for free.

88
00:05:30,330 --> 00:05:33,700
And as you can see that the de-lurked title is choose one of the sizes.

89
00:05:33,910 --> 00:05:37,650
So as you can see we have these entries and three values.

90
00:05:37,690 --> 00:05:40,220
And the fourth value is 10 right.

91
00:05:40,270 --> 00:05:46,450
So here we have these little endian tag of this list France which you can actually see which is going

92
00:05:46,450 --> 00:05:51,750
to show us some are radio buttons in order to use one of the sizes.

93
00:05:51,760 --> 00:05:53,790
I'll talk more about this later in this tutorial.

94
00:05:53,800 --> 00:05:57,910
But for now as you can see here we have this preference category.

95
00:05:57,910 --> 00:06:04,370
This is the end in tag of our category for our text free text number of free settings.

96
00:06:04,390 --> 00:06:07,040
So analysis around our project and see what happens.

97
00:06:07,360 --> 00:06:11,120
So here as you can see our application is running on this emulator.

98
00:06:11,320 --> 00:06:14,730
And if I click on this menu button and then click on settings here.

99
00:06:15,010 --> 00:06:21,390
Now we have some other options to take a number of free settings and we have these phones.

100
00:06:21,760 --> 00:06:28,530
And here we have this one is which is going to show us some radio buttons and if we actually check this

101
00:06:28,520 --> 00:06:33,720
check checkbox for this first phone and then click on back here it's not going to change the font of

102
00:06:33,720 --> 00:06:39,350
the stakes because we haven't added the logic in our main activity that were filed yet.

103
00:06:39,450 --> 00:06:39,920
OK.

104
00:06:39,990 --> 00:06:44,560
So here we need to actually create another MFL for our first taste view.

105
00:06:44,610 --> 00:06:45,100
OK.

106
00:06:45,300 --> 00:06:51,290
So after the end in curly brace of this US Meffert here specified the 3:56 takes few to.

107
00:06:51,300 --> 00:06:53,630
We can actually put RMF it here.

108
00:06:53,790 --> 00:06:58,280
So I'm going to pasting some of it here and then I'm going to explain to you what's going on here.

109
00:06:58,380 --> 00:07:03,280
So as you can see here these are the lines of code that I actually pasted here.

110
00:07:03,480 --> 00:07:06,200
Specify the font for Takes view of free.

111
00:07:06,510 --> 00:07:08,510
So now I want to talk about this method.

112
00:07:08,730 --> 00:07:13,190
So as you can see here first of all the access modifier of the Smurfette is public.

113
00:07:13,410 --> 00:07:19,440
The return type of this method is void and the name of this method is specified different for text.

114
00:07:19,440 --> 00:07:20,400
Feel free.

115
00:07:20,580 --> 00:07:22,230
OK this is very important.

116
00:07:22,380 --> 00:07:26,510
And again I declared some boolean valuables inside this method.

117
00:07:26,520 --> 00:07:28,650
The first one is boolean.

118
00:07:28,660 --> 00:07:36,910
Phone number one for text view value Boolean for phone number 2 for text free value as you can see here.

119
00:07:37,470 --> 00:07:41,780
And again Boullion of the phone number free for text free value OK.

120
00:07:41,910 --> 00:07:46,020
So as you can see here we have these values for the number one for text free value.

121
00:07:46,230 --> 00:07:51,010
Phone number two for text revalue and phone number free for text free value.

122
00:07:51,210 --> 00:07:54,140
So I just declare these Boully invaluable.

123
00:07:54,540 --> 00:07:58,910
And here I am just instantiating these boolean variables as you can see here.

124
00:07:59,130 --> 00:08:05,250
So in Duyn one hundred and fifty five hundred forty five as you can see here I am just instantiating

125
00:08:05,280 --> 00:08:11,970
this phone number of one for text for the value but really invaluable assignment operator.

126
00:08:12,180 --> 00:08:19,650
So I refer I refer to the name of this object shared preferences that get boolean checkbox or underlined

127
00:08:19,650 --> 00:08:22,350
font underline number 1 underline takes three.

128
00:08:22,350 --> 00:08:27,000
So this is the key that you want to actually access the value of these.

129
00:08:27,000 --> 00:08:33,810
So let's actually open our emulator and here if I click on menu settings here I want if you want to

130
00:08:33,810 --> 00:08:38,990
actually access the value of this checkbox here tastiness say text number three settings right.

131
00:08:39,060 --> 00:08:44,490
If I want to access this value I need to refer to the key that I actually put inside these preferences

132
00:08:44,520 --> 00:08:49,130
underline for that example here for text number three settings for this category.

133
00:08:49,140 --> 00:08:50,960
As you can see here this is that key.

134
00:08:51,510 --> 00:08:56,590
So it's in our main activity that above right here are the first to the name a name of that key.

135
00:08:56,790 --> 00:08:59,230
And here is the default value for this.

136
00:08:59,700 --> 00:09:06,660
And here I want to instantiate our phone number two for text free value assignment operator again shared

137
00:09:06,660 --> 00:09:08,450
preferences that gets boolean.

138
00:09:08,610 --> 00:09:15,390
So this is the key again checkbox underlined forne underline number to underline text free and the default

139
00:09:15,420 --> 00:09:16,550
value is false.

140
00:09:16,550 --> 00:09:20,120
Again you referred to the name of this boolean variable.

141
00:09:20,200 --> 00:09:26,580
Phone number free for text free value assignment operator shared preferences that get boolean again

142
00:09:26,670 --> 00:09:28,280
is key for the first form.

143
00:09:28,320 --> 00:09:34,080
As you can see here take about Sanderling front underline number three underlined text 3 and the default

144
00:09:34,080 --> 00:09:35,450
value is false.

145
00:09:35,460 --> 00:09:38,310
So here again I have the same if else statements.

146
00:09:38,310 --> 00:09:43,340
So if Fontenot Avant for text free value is actually true.

147
00:09:44,010 --> 00:09:48,190
If the value of this boolean variable is true then it's going to keep this line of code here.

148
00:09:48,290 --> 00:09:53,450
But here I just need to change this name to the text number.

149
00:09:53,450 --> 00:09:54,020
Free.

150
00:09:54,240 --> 00:09:56,840
OK so this is for text view free right.

151
00:09:56,970 --> 00:09:59,260
That's a typeface font number one.

152
00:09:59,520 --> 00:10:04,500
And if this condition here evaluates to false then you can actually execute this else if statement.

153
00:10:04,560 --> 00:10:12,470
So as a phone number two for text free value is true if the user for example checks this second checkbox

154
00:10:12,540 --> 00:10:15,140
here then this checkbox evaluates to TRUE.

155
00:10:15,150 --> 00:10:15,740
Right.

156
00:10:15,780 --> 00:10:20,760
So if that value is true if the value of this boolean variable is true then it's going to execute this

157
00:10:20,760 --> 00:10:21,240
line of code.

158
00:10:21,240 --> 00:10:28,650
Here again I need to change this name to ATX the takes number three that's set so typeface want to number

159
00:10:28,650 --> 00:10:29,420
two.

160
00:10:29,820 --> 00:10:35,930
And again if this condition here evaluates to false I have another LCF statement and as you can see

161
00:10:35,930 --> 00:10:40,070
as if phone number free for text free value is checked.

162
00:10:40,080 --> 00:10:47,580
So if for example they use that uncheck the same box and checks this first 48 for this first checkbox

163
00:10:47,620 --> 00:10:52,280
here this checkbox evaluates the truth value of this checkbox is going to be true.

164
00:10:52,590 --> 00:10:57,970
And then add this of the boolean value of this boolean value but it's going to be true right.

165
00:10:57,990 --> 00:11:04,080
So if this value is true if the value of this phone number of free for text for the value value is true

166
00:11:04,560 --> 00:11:06,300
then it's going to secure this kind of quote here.

167
00:11:06,300 --> 00:11:09,850
So I just need to change this name to the text number three.

168
00:11:09,960 --> 00:11:10,440
OK.

169
00:11:10,560 --> 00:11:13,170
That's a typeface phone number free.

170
00:11:13,420 --> 00:11:17,360
So now let's actually run our project and see what happens.

