So as you can see here these are the lines of code that I paste that here and now I'm going to explain
to you what's going on here.
Exactly.
So here as you can see this is actually our method and the access modifier of this method is public.
The return type of this method is Voyt and the name of this method is modified cuius want.
Right.
And this method actually accepts an argument of type shared preferences and the name of this argument
is shared preferences.
Right.
So what's the purpose of this method.
This method is actually responsible for modifying the phones of the texts of the buttons of the guest
buttons.
So let me show you the emulator here.
As you can see here if you just go inside these settings activity.
Now as you can see we have this up this item here font for keys.
Choose one of these fonts for quiz.
And if I selected here now I can actually select one of these fonts for the text of the buttons that
we have inside the Cooley's.
So for example I can choose this one here and then I can actually click on back button here and now
as you can see here the front of the button is now changed.
Or I can actually select another font for example.
Fauntleroy Blough I can select this one so as you can see here this is actually our radio group that
contains these radio buttons right.
This is actually the least preference.
So let's actually select Fauntleroy Brown and then I can click on batch button here as you can see here.
Now the font is changed.
Right.
So now let's actually look at this Meffert here.
Let's go inside the curly braces of the Smurfit And let's see what's going on here.
First of all in line number four hundred nineteen as you can see we have actually a variable of types
3.
Right.
And the name of our valuable is format string value and then I put an assignment operator here and then
you referred to the name of this argument shared preferences DOT gets strange right.
Shared preferences that get strange.
And for the first argument we need to pass the key.
So the key is main activity that cuius for that.
So let's actually go inside this main activity that of a file here.
Let's go inside this class as you can see in line number 19.
As you can see I created this constant here right which is after upstreams and the name of this constant
is cuius underlined font slight assignment operator and this constant actually holds this key settings
Underland keys underline font.
And if I were actually going inside these quiz underline preferences that XML file as you can see we
have actually this list three friends here.
Right.
So the entries is actually false at sign at a slash fonts.
So let's actually hold the comments on our keyboard and if you are using a Windows machine just hold
the control on your keyboard and then click on this right here and now as you can see here inside these
areas that examen file we have this story out here.
Right.
So these are the entries.
So these values are the values that are going to show to the user.
So we have free items as you can see here.
Let me actually show you the emulator as you can see.
Now you can see that if I actually go inside the settings activity and then if I click on this front
for for quiz item here as you can see these are the values that you are showing to the user the chunk
for the Fauntleroy around the vonder bar them all right.
So these are the values that you are going to show to the user.
And now let's actually go back into our quiz the underline preferences that exemplified as you can see
we have three values.
So I'd say add a slash false underline values.
So let's actually hold the here on our keyboard.
And again if you are using a Windows machine.
Just hold the control on your keyboard and then click on this value here.
So we have this string arrow here light front underline values and we have these items here.
So these are the actual values that you are going to work with from our job coats.
These are the actual values that we are going to interact with from our job of course right chunk Fyffe
that are T.F. Fauntleroy Blount the tity f wunderbar space.
OTFE.
So these are the name of the phones that we have inside our project.
So now if I show you the structure of the project and if we actually to go inside these assets for that
you can see that inside this phone directory inside this phone's folder we have these phones turn five
that are T.F. Fauntleroy Brown the TGF wunderbar space them all that.
All right so now let's actually go inside our quiz Underland preferences and file.
And here you can see that the key for the key attribute I assigned this value settings underline quiz
on the LEnfant And inside this main activity of a file you can see that recreated is constant and this
constant actually holds the key here settings underline keys underline font.
So whenever you want to actually first to is key I can just refer to this constant to the name of this
constant.
And then I can actually access this value right.
So now let's actually go back inside our quiz underline preferences that is in my file.
And that for the title form for Greece for the summary choose one of these phones for quiz and for the
persistent attribute.
Again I assigned the value of truth and the default value is actually at sidestream.
Slash default underline front.
So let's hold the commentary on a keyboard.
And if you are using a Windows machine you just hold the control on your keyboard and then click on
disvalue here and now as you can see here for the default font string source as you can see we have
to hunt Fyffe that or T.F..
So if the user doesn't want to actually change the font of the text of the buttons the default font
is going to be this one chunk.
5. What here.
Right.
So let's go back into our quiz Underland preferences that exemplified.
And this is actually the least preference that you're going to interact with.
So inside display an activity that a file we created this key here and now as you can see here we have
also declared these forests these typeface typefaces valuable as you can see here the data type of these
variables.
It is actually the typeface right.
So these variables can hold a difference that we have inside our project and inside inside the uncreate
as you can see here are actually initialized these valuables.
Channel 5 as you can see here and Fauntleroy Fauntleroy Brown and wonder about them all right.
And now let's actually go inside our main activity BRAITMAN that of a file.
And here you can see that we actually called this method shell inferences that gets trimmed and the
plastic key.
And for the default value you pass the value not right.
So now we can actually get the specific font from this from the shared preferences by actually passing
this key main activity that quizz underline font and you are actually assigning that value to this want
something valuable valuable right.
So now I actually created a switch statement in order to switch between the values of this fund string
value as you can see here.
So analysis actually going inside the curly braces of this front of this switch statement.
And let's see what's going on here.
Right.
So here as you can see there the first look at this first case statement here.
So we have case Chanoch five that here.
So this means that if the value that is assigned to this Funston value is 205 or T.F. as you can see
here we are actually switching between the values of these fonts thing you so case if the value of this
fonts thing value is Chhun five that OTFE then it's going to actually execute this for Lapeer for linearly
out row.
And it's going to actually either right over the values of these IRA rules of spottiness in animal cuius
as you can see here.
Right.
And then we have another for loop here inside this for a loop.
So for Cullom zero.
So let's look at the emulator here and now let's actually go back into our main activity as you can
see here we have these rules here right.
So if you want to either right over these rules here that we have in say the squeeze.
So if we have two rows here.
So we are actually iterating over the values of these three rows of spottiness in animalcules.
And here we want to actually go inside these rows and we want to actually get the buttons.
So for in column.
So initially we assigned about zero to this column and we actually created a condition here that says
until the value of this column variable is less than the value of the child count of this row.
As you can see here.
So here we have linearly right.
So we can actually get the child count.
And here I said that after each execution after each execution of this fall here is going to actually
increment the value of this column by the way you Yvonne.
And then it's going to go inside the curly braces of this for a loop.
And now it's going to execute these two lines of code here first.
It is actually saying that a button button assignment operator so button we're actually testing this
object we button update the row that get child X column right.
So we are actually getting that button that we have inside this first throw.
So it's going to start to be the first throw.
Right.
And it's going to actually look at the column 0.
Right.
So the column 0 is this one the Spartan peacock.
Right.
And then as you can see here it's going to actually go inside this for a loop.
First as you can see here it's going to get this spot in.
Right.
And then it's going to call the sniff at on this button button that set type face.
Main activity that taunt that actually chunk five right so as you can see we have actually a typo.
So let's actually go back inside our main activity out of a file.
And now this actually changed its name to Chalk Talk five.
And let's actually change this name also to hunt 5.
As you can see here.
So now let's go back into our main activity fragment that of our fight and here let's also changed his
name to chant five and now the error is gone.
Right.
So now let's actually start from this case statement here.
Again I want to actually explain to you what's going on here.
Again.