So now as you can see our application is running on the simulator.
So now I want to actually click on this menu button settings and here as you can see we have some additional
options.
Text Number two settings.
So these are the settings for text number to text view.
So if I actually checked this checkbox here for this form.
Chunk 5 this is another one right.
And now if I click on Patch button here let's see what happens.
And as you can see here nothing happened here.
So there must be a problem.
OK.
So let's actually go back to our Meffert specify the format for takes you to.
There is a problem here and we need to fix that fix that problem.
And as you can see here inside our Meffert specified the font for text view to it there is a problem
here.
THC takes number one and this is wrong.
Finitude said the typeface Forty-Eight it takes number two.
Again we made the same mistake here.
So remember that this sitting here these are the settings these are the checkboxes that are related
only to these takes butu.
So here we need to is actually referred to the name of our text.
It takes number two.
And here again here is the text number two.
So remember THC takes number two THC takes number two and THC takes number two.
Right.
So here we are we are to actually set the typeface for these takes view only.
So let's run our project again.
So this is a common mistakes mistake that are always students make.
And here I wanted to actually show you not to actually make this mistake here.
So as you can see here our application is running on this emulator here and it says and as you can see
the front of our face is now changed.
So if I click on these settings here now you can see these fonts here.
So if I unchecked this checkbox and check the search box here and if I click on back button here.
Now here you can see that the front of this takes view only is changed.
So if I click on the settings again here and now if I actually uncheck this checkbox and check the search
box here for this first form and if I click on back here.
Now as you can see the front of our text view is now changed.
Right.
So let's change this form to the first one.
So let's check this one and check this checkbox here.
So if I click on back.
Now as you can see the front of this takes you is now changed.
So now let's actually put the logic for our fair take takes view.
So let's go back to our preferences underlined find that example here.
After the ending tag of this preference category here I want to I try to add another preference category
here inside our preferred screen.
Remember here we need to add some other lines of code so I'm going to paste in some more lines of code
here and then I'm going to explain 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 have another prevents category and the title of this category is text number fli settings.
OK.
And again the first checkbox is this one checkbox for number of.
Fun for text free.
Here we want to actually set the typeface to set the font for our text feel free OK.
And the title again is Cheick chunk 5.
The summary is this is 4 to number one.
And as you can see the default value is this one the name of this font.
And here we are actually ending this checkbox for reference pre-feminist with this ending tag.
And here as you can see we have this checkbox preference again.
And the key is checkbox.
Number two for takes free as you can see here checkbox font.
Number two tastefully the title is Fauntleroy Brown and the summary is.
This is a phone number two.
And here the default value is Fauntleroy Brown here.
OK.
And here we have this checkbox preference again for our first form.
As you can see here checkbox with number of the title is wrong as you can see I don't want to use this
font.
I want to use the word font that I have in my project structure.
So as you can see here in my present structure I don't want to use this one the project.
I just want to use the Android.
OK so just select this section here.
Select it and now select these.
And right now I can see my project structure better.
OK.
And as you can see here inside these assets Walder and inside this directory fonts directed here.
I want to use this one.
This the name of this friend form wunderbar space them.
So I just need to delete this title here.
I just need to delete this a title here and I can just type in vonder bar space or dot or T.F. right.
And the summary is this is for number three.
And again the default value is wrong.
I just need to type Typee wander bar space or dot or T.F..
Right.
So now as you can see this is our first checkbox preference and here we have these lists pretty France
as you can see here the Andretti's font size takes free.
The total is the size of your phone for free.
And as you can see that the de-lurked title is choose one of the sizes.
So as you can see we have these entries and three values.
And the fourth value is 10 right.
So here we have these little endian tag of this list France which you can actually see which is going
to show us some are radio buttons in order to use one of the sizes.
I'll talk more about this later in this tutorial.
But for now as you can see here we have this preference category.
This is the end in tag of our category for our text free text number of free settings.
So analysis around our project and see what happens.
So here as you can see our application is running on this emulator.
And if I click on this menu button and then click on settings here.
Now we have some other options to take a number of free settings and we have these phones.
And here we have this one is which is going to show us some radio buttons and if we actually check this
check checkbox for this first phone and then click on back here it's not going to change the font of
the stakes because we haven't added the logic in our main activity that were filed yet.
OK.
So here we need to actually create another MFL for our first taste view.
OK.
So after the end in curly brace of this US Meffert here specified the 3:56 takes few to.
We can actually put RMF it here.
So I'm going to pasting some of it here 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.
Specify the font for Takes view of free.
So now I want to talk about this method.
So as you can see here first of all the access modifier of the Smurfette is public.
The return type of this method is void and the name of this method is specified different for text.
Feel free.
OK this is very important.
And again I declared some boolean valuables inside this method.
The first one is boolean.
Phone number one for text view value Boolean for phone number 2 for text free value as you can see here.
And again Boullion of the phone number free for text free value OK.
So as you can see here we have these values for the number one for text free value.
Phone number two for text revalue and phone number free for text free value.
So I just declare these Boully invaluable.
And here I am just instantiating these boolean variables as you can see here.
So in Duyn one hundred and fifty five hundred forty five as you can see here I am just instantiating
this phone number of one for text for the value but really invaluable assignment operator.
So I refer I refer to the name of this object shared preferences that get boolean checkbox or underlined
font underline number 1 underline takes three.
So this is the key that you want to actually access the value of these.
So let's actually open our emulator and here if I click on menu settings here I want if you want to
actually access the value of this checkbox here tastiness say text number three settings right.
If I want to access this value I need to refer to the key that I actually put inside these preferences
underline for that example here for text number three settings for this category.
As you can see here this is that key.
So it's in our main activity that above right here are the first to the name a name of that key.
And here is the default value for this.
And here I want to instantiate our phone number two for text free value assignment operator again shared
preferences that gets boolean.
So this is the key again checkbox underlined forne underline number to underline text free and the default
value is false.
Again you referred to the name of this boolean variable.
Phone number free for text free value assignment operator shared preferences that get boolean again
is key for the first form.
As you can see here take about Sanderling front underline number three underlined text 3 and the default
value is false.
So here again I have the same if else statements.
So if Fontenot Avant for text free value is actually true.
If the value of this boolean variable is true then it's going to keep this line of code here.
But here I just need to change this name to the text number.
Free.
OK so this is for text view free right.
That's a typeface font number one.
And if this condition here evaluates to false then you can actually execute this else if statement.
So as a phone number two for text free value is true if the user for example checks this second checkbox
here then this checkbox evaluates to TRUE.
Right.
So if that value is true if the value of this boolean variable is true then it's going to execute this
line of code.
Here again I need to change this name to ATX the takes number three that's set so typeface want to number
two.
And again if this condition here evaluates to false I have another LCF statement and as you can see
as if phone number free for text free value is checked.
So if for example they use that uncheck the same box and checks this first 48 for this first checkbox
here this checkbox evaluates the truth value of this checkbox is going to be true.
And then add this of the boolean value of this boolean value but it's going to be true right.
So if this value is true if the value of this phone number of free for text for the value value is true
then it's going to secure this kind of quote here.
So I just need to change this name to the text number three.
OK.
That's a typeface phone number free.
So now let's actually run our project and see what happens.