Hire river in this theater they are really going to go ahead and create another Android application.
So just click on this start and you Andrex to your project.
OK.
Now for the application name just typing just typing app 8 and here you can actually specify the company
domain package name and project location and then click on next year make sure that you actually choose
the API 16 Android 4.1 gentlemen next Blanche activity next.
And here don't change any finish.
And then we can finish.
OK everyone now just delete this.
Hello to text you here and then double click on this arrest folder here lay out and then click on DoubleClick
this activity underline I mean that example and then click on these floating action button here and
then person Enter key on your keyboard.
OK.
So let's go back inside this content underline minute example.
And now I want to actually drag in a linear layout vertical into this screen here.
OK.
So just to it in the center of the screen and then click on a relative lay out and let's actually find
the padding attribute that is actually related to this relatively out and for the odd just putting numbers
0 here.
And as you can see now this linearly outwards the court is actually covering the entire screen OK the
entire width and the entire height of the screen.
OK.
So now I want to actually dragging a linearly out horizontal into this linear out vertical.
OK.
Now as you can see in this component 3 section as you can see here I have a linear layout horizontal
inside this linear layout vertical.
OK so now I want to actually put some components inside this linearly out horizontal.
OK.
Now in order to actually drag a large text view into this linear layout horizontal I can just click
on this large text view here and then you can just click on this linearly out horizontal here.
OK.
So as you can see here.
Now these are large takes you this takes you actually inside this linearly out horizontal.
OK.
As you can see I can close and open this linearly out horizontal by just clicking on this little triangle
here.
OK.
So this takes view is inside of these a linear layout horizontally.
So now let's actually double click on this a large takes here and a four the text just type in here
and healthy and for the ID are just type in here.
XTi healthy.
So now as you can see here I actually changed the text and the idea of this takes you.
So now I want to actually tracking a checkbox into this linearly out horizontal OK.
So let's actually find the checkbox here as you can see I have this checkbox component here.
So now let's actually select this text box here.
And then you can actually click on these linearly out horizontal.
Or you can actually drag it here into these linearly or horizontal OK.
So I just click on this linearly or horizontally here as you can see here.
Now this checkbox is beside this am I help you text you.
So because this is actually a linear layout and its orientation is horizontal is going to actually put
the components beside each other.
So hopefully that makes sense.
And let's actually click on this checkbox here and for the text just type in here.
Yes.
And for the ID you can actually type in C H X..
This says it stands for checkbox c h X..
Healthy Yes C H x healthy yes.
So now again it's actually dragging another checkbox here.
So just click on this checkbox here and then again put it inside these linearly out horizontal.
So just double click on the checkbox and for the text just type in here no.
And for the ID just type in here see X healthy No.
OK.
So as you can see here I have a linearly or horizontal here and I have a text view here.
Am I healthy.
And I have these yes checkbox and these no checkbox here.
OK.
So let's actually click on this linearly and horizontal here.
And let's actually find that gravity attributes as you can see.
I have to lay out gravity.
Ok this attribute is for the gravity of this linearly of itself and this attribute this gravity attribute
here is actually for the gravity of the tides of this linearly out.
These components are actually the children of this linearly.
OK so now let's actually click on this linearly or horizontally and 4 and just opened this gravity attribute
by actually clicking on this little triangle here and then check this a checkbox here that says Center
underline horizontal.
Now as you can see these components are actually positioned at the center of these linearly out.
OK.
So hopefully that makes sense.
So this gravity attribute is for actually positioning your components inside the screen.
OK so now let's actually go back inside this main activity of our file here and now let's actually delete
these of these lines of code here and again they read these out lines of code that actually are related
to the floating action button.
And now I can actually put my own codes inside of this uncreate Meffert.
OK.
Now let's actually create a text view object here inside this uncreate if it takes to you.
And for the name of this text you object just type in here T.
XTi healthy.
OK.
And then put an assignment operator here.
And now I need to actually cast this object to a text object.
OK.
Find you by I-T or that ID that t XTi healthy.
OK so now let's actually create an object from this checkbox here checkbox class.
So again I can just type in here checkbox.
OK.
So as you can see here I have a class called checkbox.
So let's actually hold the common key and then click on this checkbox here.
If you are using a Windows machine you need to actually hold the control key and then click on this
checkbox OK.
So as you can see here this checkbox class is actually extending this camp it this compound bottom class.
So let's actually hold the command key and let's go inside this compound button and this compound button
is actually extending this button class.
OK.
And this bottom class is actually extending.
This takes your class and this takes three class is extending this view class.
OK.
So hopefully that makes sense.
And let's actually close these classes that are actually opened.
OK.
So inside this main activity that Java as you can see I have a class called checkbooks.
OK.
So for the name of this object I can just type in C x.
Healthy Yes.
And then I put an assignment operator here and then I actually put in a pair of and brackets here in
order to cast this object to a checkbox object.
OK.
Otherwise the compiler may finish that you're actually referring to to an object of type view.
OK.
So checkbox find view by ID or that Id dot see x.
Healthy Yes.
OK so now this object is actually fairly end to this component here.
OK this checkbox that says yes.
So let's actually create another checkbox for this checkbox component here.
So again I can actually refer to the name of this checkbox class checkbox C H x healthy.
No.
OK.
And then I put an assignment operator here and then inside a round brackets again.
I can actually cast this object to the checkbox object and then I can just type in find view by ID or
that Id dot see Edge x no.
OK.
So it's a healthy No.
OK.
And now let's actually run our project and see what happens.
OK.
Now as you can see our application is actually running on this emulator here.
OK.
And this is our text you.
Am I healthy.
And these are two text boxes here.
OK.
Yes checkbox and no checkbox.
OK so now we want to do something that whenever you are that I actually check one of these checkboxes
the other checkbox be checked off OK.
When I actually checked these are yes checkbox here I cannot check it is a no checkbox here too.
OK.
So let's actually do that.
First of all I need to actually be fair to the name of this CSX Hellfires object here.
OK.
Now I can just refer to the name of this C H.
Healthy Yes object that sets unclick listener new view that unclick listener.
OK.