So as you can see here now our application is running on this emulator.
So if I click on these menu button and then the settings and here if I scroll down now I want to actually
choose this one to you.
So I just need to check the checkbox and then unchecked checkbox and then if I actually come back in
here.
Now as you can see nothing happened and this takes you.
So what's the problem here.
Let's see what's the problem this time.
And here as you can see we didn't actually called this method from the andr's your method.
So as you can see here in our main activity class I actually all right at this andr's your method.
And inside this regime if we need to actually call the Smurfette specify the format for text view free
OK.
We need to call this method so that it can actually execute this method of this on you if it is called
in our Android lifecycle OK.
So let's run our project again and see what happens.
So now as you can see our application is running on the simulator and here you are in the unredeemed
state.
In our application and this is the text number for you right.
And as you can see the front of this text view is actually changed.
So if I click on this menu button here settings.
Now as you can see if they actually uncheck this checkbox and check the checkbox here and then click
click on back button here.
Now as you can see the font of this text view is actually changed.
And here again if I click on the menu button settings and if I scroll down here and now if I unchecked
this checkbox and check this checkbox here and then click on back button here.
Now again as you can see the front of this takes you is actually changed.
OK so now I think that's enough for these fonts.
But here I want to actually specify the size of this form.
OK so if I actually just select this one here.
Now I want to actually for example select this here and if I click on Patch button here I want to actually
for example set the size of this one to 50.
OK so what should I do now we need to actually put the logic for our sizes.
OK.
After this the ending curly brace of this Meffert specify the form to four takes you free.
I want to actually pasting some more efforts here inside our main activity class.
OK.
So as you can see here these are lines of code that I actually pasted here inside this main activity
class.
This is actually MFL right.
So the access modifier of this method is public.
The return type of this method is void.
So this means that this method is going to return nothing.
And the name of this method is specify the size for text view 1.
OK.
As you can see here.
So now as you can see this is.
Now we are inside the Smurfette right inside the curly braces of the Smurfette.
And first of all I actually referred to the name of this strange variable that I created inside this
class inside this man with the glass he had as you can see.
This is our main activity class and at the top of this class I created these string variables as you
can see here.
I just declared these these valuables as you can see in line eight I created.
They actually declared this string valuable the data type of this variable is strange and the name of
this where the above is takes you one size.
So this variable is going to hold the size of the text view that you want to actually for example choose
for my text view.
So as you can see here inside these preferences underline file that examine as you can see for example.
Let me actually close this a preview here.
For example as you can see here we have these list preference here for every preference category.
OK.
We have this list of preference inside that.
So this prevents category as you can see we have this list proofer hands.
And as you can see here we have Titel.
And these are the entries and entry values.
And as you can see here these values are actually strained values.
Remember font size and the font size values are actually string values.
So inside these things that example here as you can see I have these rays of string values.
So we need to actually hold these values as a string value.
So that's why at inside this mean I computed a double file inside this main activity class I actually
declared these three variables in order to hold those values the values of the textbooks for example
for the text you want size.
I want you to hold those values that these values for example 25 40 45 50 55 60 65 and 70.
OK.
So that's what I actually did declare these variables.
So now let's go inside our Mefford specify the size of four text view one.
So this is RMF right.
So are you referred to the name of that valuable assignment operator.
So here this is our shared preferences object.
So this object actually holds all the data that we actually see.
And now we can actually retrieve those data.
So remember when we actually created these preferences Underland follow the example.
You are actually saving some data to our application.
OK so this preference activity that I will find here we are adding that preferences to our application
at preferences from resource are that SML.
So remember inside a directory called exemple as you can see here we have these preferences on the loan
file that XML here as you can see.
OK.
So we have this information in our application.
Now inside the Smain I think declasse we just we just need to get those informations right.
So shared preferences that get strange.
So now you want to get a string value right.
Font size text 1.
So this is actually right.
So let's go inside these preferences underline find that example here.
As you can see here for for example for the first preference category here takes a number of settings
right.
We have a list of friends here.
OK this is a list proof France that is inside of these specific proofer in this category and its title
is text number 1 settings.
So this is the settings.
These are the settings of the text number one.
And now we can actually specify the text size of our text view.
OK.
So lispro France and the key is font size text 1.
OK.
And these are the values these are the values for this list proofer and specifies the size of your phone
for text you want choose one of the sizes and other values font sizes font size values and the default
value is for example Number 10 right.
So as you can see here this is the key.
So Vinita refer to this key in order to access this list preference.
So inside this main activity class I the same team shared preferences that get streamed fault size takes
on.
So now actual access to the list friends the radio buttons.
OK.
And this is the default value number 20.
This is the default value that is going to be chosen for our for example text size.
Right.
We need to put a default value here.
And as you can see here in line here in line one hundred and sixty three I just need to refer to the
name of Arctic's a number of anti-X the text number one object.
OK.
Data set text size.
Here I am actually specifying the size of our takes you right said text size.
This is a Meffert that actually determines what it's going to be the size of our text view.
So the takes number one that takes that said text size.
So because you are actually getting these values as you can see here these numbers as a string value
inside an array as you can see here we need to actually convert that values to a float value.
So we have to we need to actually refer to the name of the floor class.
So float capital F this is very important.
This is actually a class right float that parse float.
So this this is actually the static method inside this Floras class and it's going to actually convert
a value that is of types to a value of type float.
OK.
Takes you want size.
OK.
So in this way we can actually specify the size of our Takes view.
So now inside this and resume effort that we actually created here be overrated here.
I just need to refresh the name of that pivot specify this size for text view 1.
So now let's run our project and see what happens.
So now as you can see the size of our takes view changed.
So as you can see here this is our first text view right.
So if I click on this manual button and then settings and here as you can see I have this option here
to specify the size of your phone's for text view one right.
So I just need to click on it and as you can see here I can actually choose one of these sizes.
For example 70.
And now let's actually click on dispatch button here and now the resume if it is called and the size
of this text is actually changed.
OK so now let's actually add the other efforts for the other text to use for others takes use here.
OK so now here after the end in calibrates of this Meffert space specified the size for text you want
I want I should add one one one more method here.
So as you can see here this is the Meffert that I actually pasted here.
And as you can see here the access modifier of this method is public.
The return type of this if it is void and the name of this method is specified the size for text.
Butu right.
So now I am actually inside the Smurfit.
First of all I referred to the name of this variable that I actually declared inside the main activity
class.
This is already about right.
Strange takes two takes you to size.
So this variable is going to hold these these string values these numbers that are actually given to
us as a string value as you can see here string array.
Right.
So inside this main activity class as you can see here and inside of our Meffert specify the size photosphere
to I actually referred to the name of that idea of an assignment operator.
Again I refer to the name of this object Scheldt preferences in order to get the values inside our preferences
on the follow the example that get strained.
So this is the key.
The first argument is going to be the key.
OK.
Font size takes two.
So this key is inside these preferences underline underlined that examine and as you can see here we
have another approver in this category as you can see text number two settings.
And inside this preference Katic what we have this list preference.
Right.
And the key is font size takes two.
Right.
So if you need to actually refer to the name of this key to this key in order to access these values
the font size is values.
So inside this main activity class and inside the Smurfette I just referred to this key font size takes
two and this is going to be a default value.
For example number 20.
OK.
It doesn't really matter what value you put here because at the end you will naturally choose a font
for your text view.
Right because those values are actually inside some radio buttons.
We have a list list of radio buttons.
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
to the name of this to the text number two.
Right.
We have these text in our class right.
TXI the text number to set text size.
So here I want to set the text size of our text view.
So again because we received these values those values of the text sizes as a string value we need to
actually convert those values to a float value in order to assign those values to our to take size of
our take.
DXi takes number two.
So float that parse float.
And we need to put the string value text view to size as you can see here.
So now let's actually run our project and see what happens.
So now as you can see our application is running on this emulator here and now and when I truly click
on this menu bottom settings and then I'm going to change the settings of the text number to say things
right here.
Here we are inside these preference Cretic of these text number two settings.
This is the title.
And here I have this option again specify the size of your fonts for text butu and here I can introduce
for example select this 60 here and if I come back here back in here now as you can see the effects
are not actually happening here.
Why.
Because inside this andr's your Mefford we didn't call that Meffert we didn't call these specify the
size for text view to specify the size for text butu we need to call this Meffert insight is Arzu method
in order to change changes to take effect in our main exemplified here in our main activity.
Otherwise we cannot actually see those changes.
We need to call that movement on this resume effect which is a method that is part of the Android lifecycle.
OK.
So so that these are changes that are inside of this method is going to happen.
Right.
So let's run our project again.