So now as you can see now these changes actually happened here.
Now that takes the size of this uptakes view to is actually changed.
This is text number two.
So if I click on the menu button settings and then here click on this specify the the size of your phone's
for text view too.
Now if I actually change that size to 65 and then click a button and the Arty's human for this card.
Right.
So here you can see that the size is changed.
Now the size of this text is now much larger.
Right.
So that is actually the other method for text view of the.
So after the end in curly brace of these specify the size four takes you to Merfeld.
Here inside is an activity class I actually pasted another method and then I'm going to explain to you
what's going on here.
So as you can see here these are the lines of code that I actually pasted here.
I pasted this method here inside our main activity class.
So again the access modifier of this method is probably the return type of this method is void and the
name of this method is specified the size for pixel view free.
Right and now I am inside the Smurfette.
And again I referred to the name of this variable takes a view of the size that I actually declared
inside our main activity class here at the top.
These are variables that I declared which is of type streambed and that the name of this valuable is
text view.
Freesias right.
So now I am inside this method an assignment operator shared preferences.
So I referred to the name of this object shirred preferences that get strange.
So you want to get the string value of the size.
And here I need to refer to the name of this key that I have inside these preferences underline firelit
example.
So here as you can see inside this preference category that its title is Text Number three sittings.
I have this list preference and this is the key that I actually felt inside my main activity class.
Font size takes three.
So I need to refer to this key in order to access the values the font size values of this list preference.
So let's go inside this main activity that type of file.
So font size takes three.
Right.
This is the key and this is the default value.
OK and inline one hundred and eighty.
First I need to refer to the name of RTX the text number of free data set text size.
So here I am actually setting the size of my text view.
And because we are receiving those takes those values as a string value we need to convert those values
to a float value in order to change the size of our view right.
So float that parse float takes few freesias.
This is our value.
All right.
So now let's run our project again and again we are actually making the same mistake and the mistake
that mistake is we didn't call this Smurfit this specify the size for the next few free inside our on
resume efforts.
So I need to refer to the name of that Nefert here.
Specify the size for text view.
Free Right.
So now I can run our project and see what happens.
So now as you can see our application is actually running on this emulator.
And he had as you can see at the bottom this is our text.
OK.
This is text number free.
So now if we want to actually change the size of this text view I just need to click on this menu button
settings and here I just need to scroll down.
As you can see I have these this text number three settings so I can actually select actually click
on this option here.
The size of your fonts for takes few free.
And now I can actually specify a size for my text view for example 50.
And now if I click on back button here now the on resume if it is called right and now as you can see
this is text number free.
I can actually change the font of the state's view for example to form Larry Brown and then click on
back.
Now again as you can see the front of my text changed this it takes number of free or I can actually
click on batch button here and then if we actually to open my application again here are 51.
Now as you can see these are truly these data have been saved.
OK.
Now we can see that the changes that we made to these takes views are actually saved and we can actually
see these changes here.
This is text number free so here I can actually increase the size of my taste we are free for example
click on this option here again and click on 70 and click on back.
And as you can see here that this text size of this text which is actually increased.
So if I click on this menu button settings and then click on this option.
Here again.
Now as you can see it is 70 right.
Or I can actually select 25 40 50 for gold or other values or I can and you actually click on cancel
and then click on back and here as you can see we have these text views with these changes here.
Right.
So hopefully that makes sense.
And another important point that I've not heard about in this tutorial is that first of all it's actually
delayed our application from this emulator here.
So now inside our emulator this is up.
This is our app of 51.
So it's actually selected and halted and uninstalled this application.
And then let's actually click on OK here.
So now our application is actually uninstalled from this emulator.
Right.
So let's actually run our application again.
So now it's going to the install or application on the emulator again here and as you can see the resume
of it is called right and here and here are our text views right.
So now click on this menu abutments settings and now I want you to for example change the text size
of my text number one.
Right.
My first text view.
So I just need to click on this option here specify the size of your phone.
For takes you one right.
I just click on this here and here.
For example the user may actually want to not decide not to actually choose one of these phones right.
And then he actually clicks and this cancel here and then if he if he or she clicks on dispatch button
here let's see what happens.
And now as you can see the text size of these takes views are actually smaller.
Why this is because of this a default value that you actually specified for this method for these methods
you specified that if the user choose one of the sizes of the list preference that we put inside these
preferences underline for example if the user chooses chooses one of these or font sizes that font size
is going to be it's going to take effect on our tissues right.
But if he or she can sell cancels that feature if he or she doesn't want to for example choose one of
those sizes the default value is going to take effect.
So what is the default value the default value is inside of these specified that the take the size for
this view one or this one or this one as you can see I specified that the default value is 20.
And as you can see here 20 and 20 and we are actually calling these three methods here inside our andr's
your Meffert.
OK.
So that's why even we actually can cancel on our list preference here.
As you can see if I click on this menu button and settings settings as you can see here and if I click
on this here if I click on this cancel here and click on back here and resume if it is called.
And these methods as you can see here are going to be executed.
So the default value of these methods is actually 20.
OK.
So this value is going to take effect when the user clicks on the cancel on that at least three friends.
Ok this is the least preference as you can see this is the list preference.
And when I click on cancel the default value is going to actually specify that it is going to actually
determine the text size of our text views.
OK so if I actually click on for example 270 and then click click on back button here.
Now you can see that the text size of this text view is actually the much larger.
So hopefully that makes sense and I think that's enough for this application.
So if you have any questions about these concepts that I'll touch you in this tutorial please post the
discussion in the course and then I'll do my best to answer all of your questions.
Thank you very much for watching and I'll see you in the next tutorial.