So now before we add the logic to our main activity the double file here let's actually open our project
structure so we just click on this view tool windows and then click on Project.
Right.
So now this is the structure of our project.
And these are the files and non-sexually click on this app here at the top and then click on file and
here click on project structure.
And now as you can see in this industry Julio's I'm going to actually use the latest AP AIs that are
introduced in the latest job right in the latest version of actually Java programming language.
So now let's as far as you can see we have this sort of compatibility right.
So just click on this here and then choose 1.7 Java 7.
And again choose this one here and choose 1.7.
Right.
So as you can see here for the source composite compatibility I chose 1.7 and for their target compatibility
I chose 1.7 right.
And now let's actually click on OK here and now we should wait a little bit here is going to actually
build the cradle here for us.
And as you can see here everything is done here for us.
Right.
So now let's actually go inside this main activity that double file here and now first of all inside
this main activity class I'm going to paste in some lines of code here and then I'm going to explain
to you what's going on here.
So as you can see here these are two lines of code that are pasted here.
So in line number 12 as you can see we have a constant which is actually public static as you can see
here and the data type is streamed.
So this is fine.
Right this is constant and the name of this constant is guesses as you can see here all the letters
of this name is actually capitalized cases and that I've with an assignment operator here.
And then I assigned this string the value to this constant setting's underline number of guesses.
Right.
So what is its value.
So let's actually go inside this quiz underlying preferences that they simplify.
And now as you can see here at the top we have this list preference right.
We have a radio group that contains radio buttons.
And now as you can see here the key is 13 x underly number of guesses.
So as I told you before we actually use this key in order to interact with this least preference in
order to interact with this radio group that contains radio buttons.
So we must provide a key for our release preference so that later in our job codes we can and we can
actually interact with this list through friends and the key is settings underline number of guesses.
Now if we go back inside this main activity that our file here as you can see this is that keep settings
on the number of cases.
So here I actually created a constant so that whenever I actually referred to this case as constant
I can actually access this value.
OK.
There is no need to write at this value every time I need to actually access this key.
I can't just refer to this case as constant right in line number 13 as you can see here we have another
constant public static final strange.
And this animal underling type assignment operator and again we assigned another key to this constant.
And the key is settings underline and Namath's type.
So if you actually go inside this quiz underline preferences that examen find.
Now you can see that we have this multi-select list preference as you can see here we have these checkboxes.
We have as you can see now you can see that the key is settings on the line and the months type.
So this is that key here.
Right.
So now let's actually go back inside our main activity that of our file here.
And we have also another constant public static final string and the name is quis on the line back in
Underland cutter.
And as you can see here this is the key settings underlined keys underlined by get an underlined color.
So if you actually go inside the school is underlined preferences that examen file.
Now you can see that the key for this list friends here as you can see is this one settings under the
line crease underlined background underlined color.
Right.
So we actually referred to the ski inside our main activity out of a file.
And here we have another constant public static final three in front.
And again we assigned another key to these constant settings on the line quiz underlined font.
And if we actually go inside this quiz underline preferences that is simplified you can see that you
are referring to this key here.
Right.
This is the key settings underline quis underlined font right.
So let's actually go back and say there's an activity in say these entity that have a file here.
And as you can see here we have all these keys here inside this main activity that double file inside
this main activity class.
Right.
So hopefully that since.
Now I want to show you another important thing here.
If you actually have noticed before that our application is going to be an import in portrait mode.
Right.
So let's actually open our project structure.
And as you can see here I just need to double click on this manifests here as you can see here for this
activity here for this main activity.
I want to add another attribute and here I can just type in orientation and here as you can see it says
all screen orientation portraits so choose screen orientation portraits for this activity because our
application is going to be in portrait.
Right.
So let's go back inside the main activity that are filed here and now we need to add other logic's here.
So now I'm going to paste in a line of code here.
And then I'm going to explain to you what's going on here.
So as you can see here this is the line of code that I pasted here.
So here as you can see we have actually a boolean variable and this is private and this is of type Boolean
and the name of this variable is IIS settings changed and in Ife with an assignment operator here.
And initially I assigned the value of false to this variable.
So this variable is going to determine that there are setting's is actually changed or not.
So for example if I show you this emulator here our application is here and now if I you to go inside
the settings now for example if I change the background color to for example blue.
Now as you can see we actually use this idea.
But in order to determine whether the settings are actually be changed or or not.
Right.
So that's the job of this variable.
And I actually click on this page in here as you can see now that by the background and color of the
Queen's application is blue.
Right.
So hopefully that makes sense.
And now as you can see I'm going to pasting some more lines of code 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 pasted here.
So each line number 22 we have actually another variable and this is static.
Right.
So this means that this is going to be A-class valuable.
And we can actually use the class name in order to access this variable.
So for example main activity that Chinawhite.
So as you can see here the data type of this variable is typeface.
Right and the name of this variable is chunk of time.
So as you can see here typeface is used in order to actually hold Fornes in our application.
So as you can see we have some fonts here.
For example chunk 5 Fauntleroy Brown and wonder about wonder about space them all.
So these are the fonts that we actually hold inside our application.
So we actually created these valuables here in order to hold these phones in so that application and
we can access these forums whenever we want to.
So static typeface chunk file so this is the name of this valuable we have and other valuable in line
number 23 static typeface Fauntleroy Brown and line number 24.
We have another variable static typeface wonder about them all right.
So now as you can see here initially we didn't cite any values to these variables.
So let's go inside this uncreate method here.
And now let's get you to initialize these rowdier bells.
So as you can see these are the lines of code that I pasted here.
Inside this uncreate Meffert.
So in line I'm at 45 I am actually initializing this chunk quite variable which is of type typeface.
So chunk 5.
Assignment operator typeface I referred to the name of this class type for start create from a set.
So as you can see here inside our project structure in say the structure of our project now we can see
here inside these assets folder we have this false directory right.
So I said typeface that create from asset.
So here you are referring to these assets directory get assets as you can see here for the first argument
we need to call the Smurfit get assets in order to access this folder come on for the second argument
we need to specify the specific font that we want to access inside these assets folder.
So as you can see here inside the double quotes here we need to provide a string value right.
So instead of double quotes first I referred to the name of this folder false slash.
And now let's actually go inside these phones for their phones slash John 5.40.
So as you can see here we have this phone here Channel Five with capital C that OTTF here.
So here we are accessing this phone and we hear you are initialising this valuable chunk file.
And here we have in line number six fifty six.
We have these Fauntleroy and very well as you can see here I am initialising this variable so Fauntleroy
Brown assignment operator and then I referred again to the name of this class type face that create
from a set first for the first argument we need to specify that we want to access these assets holders
so get assets come up and we need to specify for the second argument the specific format that we want
to access.
So first because we want to access the phones that are inside of this phone strictly the first referred
to the name of the strictly Faunce slash and then I need to refer to the name of this font Fauntleroy
around that PTF as you can see here this faultily Larry Brown is with the capital F and capital B the
same name that we have here.
OK.
This is very important that the name of your font that you specify here for the sake of argument here
for this for the Smurfette create from acid said you need to actually refer to the exact name Fauntleroy
pronounce that PTF.
This is very important and in line number 47 as you can see here.
I am actually initialising this wonder about them.
So wonder about them or assignment operator typeface that creates what I said for the first argument.
Create from a get assets as you can see here here if you are actually accessing these assets folder
and for the second argument we need to specify the specific fonts that you want to access.
So that slash wonder about space them or that atya.
So as you can see here this is the exact name here wonder about space not at here.
So now the initialized are actually phones here already at Bells.
And now we need to actually put some other logic's here inside these uncreate Mefford.