1
00:00:00,680 --> 00:00:05,650
So now as you can see now these changes actually happened here.

2
00:00:05,690 --> 00:00:10,520
Now that takes the size of this uptakes view to is actually changed.

3
00:00:10,520 --> 00:00:11,790
This is text number two.

4
00:00:11,900 --> 00:00:18,070
So if I click on the menu button settings and then here click on this specify the the size of your phone's

5
00:00:18,070 --> 00:00:19,730
for text view too.

6
00:00:19,790 --> 00:00:25,670
Now if I actually change that size to 65 and then click a button and the Arty's human for this card.

7
00:00:25,670 --> 00:00:26,390
Right.

8
00:00:26,390 --> 00:00:29,700
So here you can see that the size is changed.

9
00:00:29,840 --> 00:00:32,940
Now the size of this text is now much larger.

10
00:00:33,050 --> 00:00:33,950
Right.

11
00:00:34,070 --> 00:00:37,950
So that is actually the other method for text view of the.

12
00:00:38,120 --> 00:00:43,170
So after the end in curly brace of these specify the size four takes you to Merfeld.

13
00:00:43,190 --> 00:00:49,310
Here inside is an activity class I actually pasted another method and then I'm going to explain to you

14
00:00:49,520 --> 00:00:51,040
what's going on here.

15
00:00:51,050 --> 00:00:55,080
So as you can see here these are the lines of code that I actually pasted here.

16
00:00:55,100 --> 00:00:58,120
I pasted this method here inside our main activity class.

17
00:00:58,130 --> 00:01:03,890
So again the access modifier of this method is probably the return type of this method is void and the

18
00:01:03,890 --> 00:01:08,250
name of this method is specified the size for pixel view free.

19
00:01:08,300 --> 00:01:10,930
Right and now I am inside the Smurfette.

20
00:01:10,940 --> 00:01:16,430
And again I referred to the name of this variable takes a view of the size that I actually declared

21
00:01:16,460 --> 00:01:19,130
inside our main activity class here at the top.

22
00:01:19,150 --> 00:01:24,620
These are variables that I declared which is of type streambed and that the name of this valuable is

23
00:01:24,620 --> 00:01:25,550
text view.

24
00:01:25,630 --> 00:01:27,250
Freesias right.

25
00:01:27,290 --> 00:01:32,870
So now I am inside this method an assignment operator shared preferences.

26
00:01:32,870 --> 00:01:37,790
So I referred to the name of this object shirred preferences that get strange.

27
00:01:37,790 --> 00:01:40,610
So you want to get the string value of the size.

28
00:01:40,670 --> 00:01:45,380
And here I need to refer to the name of this key that I have inside these preferences underline firelit

29
00:01:45,410 --> 00:01:46,080
example.

30
00:01:46,280 --> 00:01:52,750
So here as you can see inside this preference category that its title is Text Number three sittings.

31
00:01:52,850 --> 00:01:58,510
I have this list preference and this is the key that I actually felt inside my main activity class.

32
00:01:58,580 --> 00:02:00,140
Font size takes three.

33
00:02:00,290 --> 00:02:06,710
So I need to refer to this key in order to access the values the font size values of this list preference.

34
00:02:06,710 --> 00:02:08,980
So let's go inside this main activity that type of file.

35
00:02:09,140 --> 00:02:10,850
So font size takes three.

36
00:02:10,850 --> 00:02:11,180
Right.

37
00:02:11,180 --> 00:02:13,100
This is the key and this is the default value.

38
00:02:13,270 --> 00:02:16,130
OK and inline one hundred and eighty.

39
00:02:16,130 --> 00:02:22,320
First I need to refer to the name of RTX the text number of free data set text size.

40
00:02:22,340 --> 00:02:25,440
So here I am actually setting the size of my text view.

41
00:02:25,730 --> 00:02:31,400
And because we are receiving those takes those values as a string value we need to convert those values

42
00:02:31,400 --> 00:02:35,420
to a float value in order to change the size of our view right.

43
00:02:35,420 --> 00:02:39,360
So float that parse float takes few freesias.

44
00:02:39,470 --> 00:02:40,220
This is our value.

45
00:02:40,230 --> 00:02:41,500
All right.

46
00:02:41,510 --> 00:02:47,780
So now let's run our project again and again we are actually making the same mistake and the mistake

47
00:02:47,840 --> 00:02:54,380
that mistake is we didn't call this Smurfit this specify the size for the next few free inside our on

48
00:02:54,380 --> 00:02:55,040
resume efforts.

49
00:02:55,040 --> 00:02:57,310
So I need to refer to the name of that Nefert here.

50
00:02:57,470 --> 00:02:59,960
Specify the size for text view.

51
00:03:00,020 --> 00:03:01,290
Free Right.

52
00:03:01,310 --> 00:03:04,670
So now I can run our project and see what happens.

53
00:03:04,670 --> 00:03:09,160
So now as you can see our application is actually running on this emulator.

54
00:03:09,170 --> 00:03:12,250
And he had as you can see at the bottom this is our text.

55
00:03:12,280 --> 00:03:12,700
OK.

56
00:03:12,740 --> 00:03:14,070
This is text number free.

57
00:03:14,150 --> 00:03:19,040
So now if we want to actually change the size of this text view I just need to click on this menu button

58
00:03:19,040 --> 00:03:22,990
settings and here I just need to scroll down.

59
00:03:23,210 --> 00:03:28,940
As you can see I have these this text number three settings so I can actually select actually click

60
00:03:28,940 --> 00:03:31,030
on this option here.

61
00:03:31,070 --> 00:03:33,760
The size of your fonts for takes few free.

62
00:03:34,100 --> 00:03:38,770
And now I can actually specify a size for my text view for example 50.

63
00:03:39,170 --> 00:03:44,570
And now if I click on back button here now the on resume if it is called right and now as you can see

64
00:03:44,990 --> 00:03:47,120
this is text number free.

65
00:03:47,420 --> 00:03:54,200
I can actually change the font of the state's view for example to form Larry Brown and then click on

66
00:03:54,200 --> 00:03:54,840
back.

67
00:03:54,890 --> 00:04:02,240
Now again as you can see the front of my text changed this it takes number of free or I can actually

68
00:04:03,320 --> 00:04:09,450
click on batch button here and then if we actually to open my application again here are 51.

69
00:04:09,500 --> 00:04:14,430
Now as you can see these are truly these data have been saved.

70
00:04:14,750 --> 00:04:15,330
OK.

71
00:04:15,350 --> 00:04:21,170
Now we can see that the changes that we made to these takes views are actually saved and we can actually

72
00:04:21,380 --> 00:04:23,120
see these changes here.

73
00:04:23,120 --> 00:04:28,640
This is text number free so here I can actually increase the size of my taste we are free for example

74
00:04:29,030 --> 00:04:34,640
click on this option here again and click on 70 and click on back.

75
00:04:35,200 --> 00:04:40,010
And as you can see here that this text size of this text which is actually increased.

76
00:04:40,010 --> 00:04:45,560
So if I click on this menu button settings and then click on this option.

77
00:04:45,560 --> 00:04:46,520
Here again.

78
00:04:46,820 --> 00:04:49,760
Now as you can see it is 70 right.

79
00:04:49,760 --> 00:04:56,570
Or I can actually select 25 40 50 for gold or other values or I can and you actually click on cancel

80
00:04:57,020 --> 00:05:03,300
and then click on back and here as you can see we have these text views with these changes here.

81
00:05:03,350 --> 00:05:04,680
Right.

82
00:05:04,970 --> 00:05:06,620
So hopefully that makes sense.

83
00:05:06,650 --> 00:05:13,550
And another important point that I've not heard about in this tutorial is that first of all it's actually

84
00:05:13,550 --> 00:05:16,840
delayed our application from this emulator here.

85
00:05:16,850 --> 00:05:19,430
So now inside our emulator this is up.

86
00:05:19,430 --> 00:05:21,140
This is our app of 51.

87
00:05:21,230 --> 00:05:26,040
So it's actually selected and halted and uninstalled this application.

88
00:05:26,960 --> 00:05:28,760
And then let's actually click on OK here.

89
00:05:28,760 --> 00:05:31,870
So now our application is actually uninstalled from this emulator.

90
00:05:31,870 --> 00:05:32,690
Right.

91
00:05:32,690 --> 00:05:36,350
So let's actually run our application again.

92
00:05:36,700 --> 00:05:42,230
So now it's going to the install or application on the emulator again here and as you can see the resume

93
00:05:42,230 --> 00:05:46,630
of it is called right and here and here are our text views right.

94
00:05:46,700 --> 00:05:54,800
So now click on this menu abutments settings and now I want you to for example change the text size

95
00:05:54,830 --> 00:05:56,580
of my text number one.

96
00:05:56,580 --> 00:05:57,140
Right.

97
00:05:57,400 --> 00:05:59,030
My first text view.

98
00:05:59,120 --> 00:06:03,300
So I just need to click on this option here specify the size of your phone.

99
00:06:03,350 --> 00:06:04,950
For takes you one right.

100
00:06:04,970 --> 00:06:08,190
I just click on this here and here.

101
00:06:08,390 --> 00:06:16,030
For example the user may actually want to not decide not to actually choose one of these phones right.

102
00:06:16,160 --> 00:06:23,090
And then he actually clicks and this cancel here and then if he if he or she clicks on dispatch button

103
00:06:23,090 --> 00:06:25,320
here let's see what happens.

104
00:06:25,340 --> 00:06:32,030
And now as you can see the text size of these takes views are actually smaller.

105
00:06:32,030 --> 00:06:41,060
Why this is because of this a default value that you actually specified for this method for these methods

106
00:06:41,390 --> 00:06:48,020
you specified that if the user choose one of the sizes of the list preference that we put inside these

107
00:06:48,020 --> 00:06:55,400
preferences underline for example if the user chooses chooses one of these or font sizes that font size

108
00:06:55,400 --> 00:06:59,210
is going to be it's going to take effect on our tissues right.

109
00:06:59,390 --> 00:07:06,740
But if he or she can sell cancels that feature if he or she doesn't want to for example choose one of

110
00:07:06,740 --> 00:07:11,720
those sizes the default value is going to take effect.

111
00:07:11,720 --> 00:07:17,650
So what is the default value the default value is inside of these specified that the take the size for

112
00:07:17,650 --> 00:07:24,020
this view one or this one or this one as you can see I specified that the default value is 20.

113
00:07:24,050 --> 00:07:31,740
And as you can see here 20 and 20 and we are actually calling these three methods here inside our andr's

114
00:07:31,750 --> 00:07:32,750
your Meffert.

115
00:07:32,780 --> 00:07:33,410
OK.

116
00:07:33,650 --> 00:07:39,440
So that's why even we actually can cancel on our list preference here.

117
00:07:39,530 --> 00:07:45,020
As you can see if I click on this menu button and settings settings as you can see here and if I click

118
00:07:45,020 --> 00:07:50,570
on this here if I click on this cancel here and click on back here and resume if it is called.

119
00:07:50,720 --> 00:07:54,390
And these methods as you can see here are going to be executed.

120
00:07:54,560 --> 00:07:58,150
So the default value of these methods is actually 20.

121
00:07:58,280 --> 00:07:58,730
OK.

122
00:07:58,820 --> 00:08:05,060
So this value is going to take effect when the user clicks on the cancel on that at least three friends.

123
00:08:05,160 --> 00:08:08,590
Ok this is the least preference as you can see this is the list preference.

124
00:08:08,780 --> 00:08:15,410
And when I click on cancel the default value is going to actually specify that it is going to actually

125
00:08:15,410 --> 00:08:18,810
determine the text size of our text views.

126
00:08:18,910 --> 00:08:25,780
OK so if I actually click on for example 270 and then click click on back button here.

127
00:08:25,790 --> 00:08:31,430
Now you can see that the text size of this text view is actually the much larger.

128
00:08:31,430 --> 00:08:36,240
So hopefully that makes sense and I think that's enough for this application.

129
00:08:36,260 --> 00:08:42,800
So if you have any questions about these concepts that I'll touch you in this tutorial please post the

130
00:08:42,800 --> 00:08:47,000
discussion in the course and then I'll do my best to answer all of your questions.

131
00:08:47,000 --> 00:08:50,450
Thank you very much for watching and I'll see you in the next tutorial.

