OK as you can see here it's now actually showing us are the same results.
OK.
The checkbox of this yes check box is actually checked on.
OK.
So the value of the box is actually true and the value of this check box is actually false.
OK.
So hopefully that makes sense.
Let's actually go back and say this content's underline minute that example and then let's actually
try again linearly out horizontally into this linearly out vertical and then let's actually gain a large
takes you into These are linearly horizontal.
So just click on this larger text here and then put it inside.
These are linearly out horizontal Okay and then double click and these are large text view.
And then for the text of this text you just type in here.
True or false.
OK.
And then let's actually write in a checkbox into this linearly or horizontal and if by mistake you put
this checkbox under this linear layout horizontal for example in here you can just delete this component
or you can drag that component inside these are linearly out here.
OK.
So let's actually track a checkbox into this linearly or horizontal and then double click on this checkbox.
So for that for the text of this checkbox just type in here.
Yes.
And for the ID just type in here C is x true or false.
Yes OK and let's actually do i another checkbox into this linearly or horizontal.
So just click on this checkbox here and then put it inside this linearly or horizontal.
So double click on this checkbox and for the text just typing no.
And for the ID just type in C is x true or false.
No.
So the idea of this checkbox as you can see here the idea of this checkbox is C-h x.
True or false.
Yes.
And the idea of this checkbox is C H.
True or false.
No.
OK.
So let's actually click on this linearly and here and here.
Check this checkbox that says Center underline horizontal.
OK.
Can can actually position these components horizontally in the center of this in the center of this
linearly out.
OK so now let's actually go back inside this main activity of a file Let's actually scroll to the top
of the screen.
And now let's actually scroll to the top of the file here.
And this actually creates a comment here.
True or false.
So here I just need to create two checkbox objects so checkbox see X true or false.
Yes.
Assignment operator and then I need to cast this object to a checkbox object find view by ID or that
Id dot c c is x true or false.
Yes.
Again let's actually create a checkbox object C is x true or false.
No assignment operator checkbox find you by ID are taught ID that C is x true or false.
No.
OK.
So hopefully that makes sense.
Now lets actually interact with these objects.
So scroll down the file here and then this actually creates a comment here so just type in here.
True or false.
OK.
And then let's actually create a boolean variable true or false and then there's actually putting in
an assignment operator here and then actually putting a pair of round brackets here.
So here I am just typing.
True or False.
False.
OK.
And then I need to put in a semi-colon at the end of my statement.
OK.
So as you can see here first of all I actually created a variable of type Boolean and then I actually
gave a name to this variable.
True or false.
And here I actually assigned a value to this variable.
And here actually created a boolean expression.
OK true or false.
So the result of this expression is going to be assigned to this variable.
Ok so now let's actually create and if statement here.
If the value of this true or false value is actually true or false.
OK if the value of these are true or false variable is actually true then execute this line of code
here inside of this curly braces.
C X true or false.
Yes said said checked true.
Otherwise else if the value of this.
True or false value but is actually false.
So exclamation mark.
True or false.
Ok then execute this line of code inside of this curly braces C H x true or false.
No Dot said check it.
True.
OK so now let's actually run our project and see what happens.
As you can see here our application is actually running on this emulator.
And as you can see here the value of this true or false variable is actually true.
OK the value of this search box is actually on the value of this checkbox is actually true.
OK.
Yes checkbox.
OK.
And let me explain again.
First I actually created a value of type Boolean and then I actually assigned a boolean expression to
this variable so the value of this boolean expression is actually to true so that true value is going
to be assigned to this variable.
And here I actually created an if else statement here.
If the value of is true or false value but is actually true then it's going to try to execute this line
of code here.
So as you can see here the value of this checkbox is true.
OK the search box is actually on.
OK.
Else if the value of this check.
True or false value but is actually false.
OK.
Exclamation mark.
True or false means.
If the value of the check box is actually false OK then it's going to actually execute this line of
code here.
OK.
So now let's actually comment out this if else statement here because I want to show you another way
in order to write these codes.
OK everyone.
Now I can just type in here see x.
True or false.
Yes.
That said I checked and then here I need to put in a pair of round brackets.
And here I can't just type in true or false question mark.
True.
OK.
Otherwise false.
OK.
And this means that if the value of this true or false variable is true then assign the value true to
this said checked method.
Otherwise assign the value funds to this.
So check it.
OK.
So if you've got this valuable and be assigned this expression to are valuable.
So the result of this expression is going to be assigned to this variable.
And if the value of this variable is true then it's going to assign the value true to the Smurfette.
Otherwise it's going to actually assign the value false to this method.
Again I can just type in S.H. And it's true or false.
No data set checked.
And then here inside the prentices again I can just put in a pair of round brackets.
Exclamation mark.
True.
Or false.
OK.
Question March.
True otherwise false.
OK.
So as you can see here I specified that if the value of the is true or false variable is false then
assign the value true to this said checked Meffert.
Otherwise assign the value false to this set check for the key.
So as you can see here we put this exclamation marks before this variable name.
OK.
If the value of this variable is false assign the value true to this search check if it is related to
this CSX true or false no object.
Otherwise if the value of this is true or false variable is true assign the value of funds to this search
method that is related to this see x.
True or false no object.
So let's actually run our project and see the results.
Ok everyone as you can see here now our application is actually running on this emulator here.
And as you can see the value of this true or false value of it is true.
OK.
So this checkbox is actually checked on as you can see here the value of this true or false variable
is true.
So this line of code as you can see here is get executed OK.
So hopefully that makes sense.
And let's actually go back and say this content underline made that example.
And then let's actually dragging another linearly out horizontal into this linear layout vertical.
Okay.
And then dreich in a large takes you into this linearly out horizontal here.
You can also put it inside this linear horizontal here inside this componentry or here.
OK.