So now as you can see our application is actually running on the emulator here.
OK.
And we can see these values inside of these linearly aesthetical and I can actually scroll down in order
to see the other values and I can actually check these checkboxes here as you can see on here.
As you can see here I can't check these radio buttons as you can see here.
So now let's actually change the background color of this linearly out to our lighter color.
OK.
So here I can just go back and say this design type here and now I can actually select this linearly
outwards Tikal here.
And for the background attribute as you can see here you have these going out here silica is linearly
out and for the background we can actually assign another value.
For example hash tag F F F F and one to free and then press enter on your keyboard.
And now as you can see the background color of our linearly aesthetical is actually changed.
OK so now let's actually run our project again and see what happens.
So as you can see in our application is running on the simulator and we can see these values here.
OK.
So I can get you to take these checkboxes and here I can get you to use the stick bar.
I can actually rate here and here as you can see these are the radio radio buttons that are inside our
radio group.
OK.
So I can take them here.
OK.
So now let's actually go back and say this main activity that are right here and now let's actually
did it these lines of code that are related to the Options menu.
OK so now we can actually put our own codes here.
OK.
So now I want to actually declare some objects inside is main activity class.
So here I'm going actually pasting 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 the lines of code that they actually paste that here.
OK.
And here as you can see I actually did yclept six check actually eight checkbox objects OK checkbox
number one number two number three number four number five.
Number six seven eight and actually declared an object of type but he had as you can see the name of
this object is Bar.
Another object of type rating bar rating bar and he had as you can see I declared an object of type
radio group.
OK.
As you can see here and it actually declared for different objects of type radio about local radio about
one radio button to add radio button free.
So now inside of this uncreate Meffert I want to actually instantiate these objects that they actually
are declared inside this main activity class.
OK.
So inside this uncreate Smurfette I'm going to actually pasting some lines of code here and then I'm
going to explain to you what's going on here.
OK.
So as you can see here these are the lines of code that they actually paste that here.
And you can see these values here.
And as you can see first of all I actually instantiated this checkbooks object.
And here I actually cast that this object to a checkbox object.
And here I refer to this ID checkbooks number one.
And again I did the same thing with this check box too and I tested this object to a checkbox checkbooks
object and I referred to this checkbox number two.
And here as you can see I instantiated this checkbox number for the checkbox number for the checkbox
number for as you can see here are that the checkbox number for checkbox number 5.
And here I thought Id take box number five checkbox number 6 and checkbooks number 7 and checkbooks
number 8.
OK.
And here I actually instantiate this CBOT object and here as you can see I actually cast that this object
to see what object.
And here are you referring to the IDC report.
And here as you can see I instantiated this rating what object.
And as you can see here I cast this object to R-rating But object and here as you can see the effect
I referred to the ID rating but here as you can see here and here as you can see I actually instantiated
this radio object and hit as you can see it's showing us and at it.
OK.
So let's actually hold that our mouse pointer over the area and see what's the error.
As you can see it's just cannot resile symbol.
Radio Group.
So we don't have any ID card.
Actually the radio group that is actually assigned to this radio group object OK.
So here I can actually go in and say this content underline minute example and here as you can see in
say this componentry section we have this lady here.
OK so now let's actually find the attributes of this radio group as you can see this I.D. doesn't have
a default value.
OK so here I need to actually assign a value for this radio group object.
So I can just type in radio group as an ID OK group and then our press Enter key on your keyboard.
So let's ask you to go back and say this main activity that double fight and now as you can see the
error is gone.
OK.
As you can see here we are instantiating these arrays you abandoned objects as you can see I am actually
casting this object to write you about it and find if by id artist Id dot radio button one.
OK.
And here as you can see radio button to lead you about in free.
OK.
So now I want to actually make these checkboxes as you can see here.
I want to make this a checkbox says a listener to the clicks that the user made on these checkboxes
here.
OK.
So you want to do some think of it these checkboxes.
OK.
And then I want to make them a listener to the clicks of the user.
OK.
So in order to do that OK I'm going to actually 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 the lines of code that they actually pasted here.
And as you can see here I am actually making each of these eight checkboxes a listener or to the police
of the user.
OK.
So in order to do that you need to actually call this set on checked change a listener on this or checkbox
object.
OK.
And as you can see here we actually call this if it's set on check to change the center on each of these
checkbox objects and inside the apprentice's as you can see if you need to actually specify the context.
OK so the context is the class main activity that this.
OK.
So in order to actually make these checkboxes or listen to the clicks of the user you need to actually
implement an interface.
Here in our class.
So here I can just type in implements.
Compound compound BOTTEN OK.
Compound button dot on checked.
Change listener.
OK.
So as you can see he had to actually implement this interface in order to actually make these checkboxes
or listening to the police of the user.
And if I actually hovered over this area and as you can see it says classman activity must either be
declared abstract or implement abstract method and take the change as you can see here this method.
So now let's actually implement that method in our class.
So here I can just like click locally in inside our class and then click on generate and here you can
actually click on implement methods.
So as you can see here this is the method that you need to actually implement in our class as he had
said he had it says Android that visit that compound button that unchecked the change to the Senate.
OK.
So it is interface as you can see.
You can see this letter inside this little green circle here.
OK.
And this is the method that is inside of this interface.
Ok unchecked change.
So here I just need to click on OK.
And as you can see here this is the method that you need to actually implement and you need to actually
overwrite this method here inside your class.
So now our inside of the Smurfette I'm going actually are pasting some lines of code and then I'm going
to explain to you what's going on here.
So as you can see here I actually pasted this sweetest statement inside this method.
OK.
And now we can actually explain to you what what does this switch statement do here.
OK.
So now as you can see I created a switch statement inside the Smurfit unchecked to change.
And this MF it actually accepts two arguments.
The first one is button view and the actually the type of this button is compound button and then the
next one is is checked and the type of this argument is Boullion.
And remember that here we are actually implementing compound button that Antek change the center because
we can actually check our multiple checkboxes in our layout.
As you can see here this is because of this feature we are actually implementing the compound button
that took changelessness because because we can actually to change change the value of multiple checkboxes
in our program.
OK.
So as you can see here insight is unchecked to change Meffert.
Here if you have an argument of type compound button and the name of this argument is bartend view.
And we have this is checked boolean argument here.
OK.
And we have this switch statement here.
OK.
And inside this switch statement as you can see here are actually specified that up button view.
OK.
So here we need to actually differentiate between each of these checkboxes.
OK.
So if you need to actually know which one of these checkboxes the use that actually checked.
OK.
So in order to know that first of all we need to actually have this spot in view.
OK.
So these are all but interviews with all of these checkboxes as you can see here are each of these are
actually all of these are button views.
OK.
So here we have both in view dot gets ID.
OK.
So by actually getting the ID of these components in our screen we can actually specify that of which
one of these checkboxes they use that actually checked.
OK.
So button in that get ID Chase are thought Id the checkbox number one.
OK.
So if you have a checkbox an I.D. that is actually its name is check box number one.
So this one is checkbooks number one.
OK.
So if the checkbox is a checkbox number of one then if that that actually checked it just checked this
checkbox number of one then we have an if statement here it is checked.
OK.
So if the value of this check box is actually checked so that's because so that's why you have these
Boullion argument here.
Bulliet is checked.
So this argument actually allows us to find out whether the checkbox is checked or not.
OK.
So if the value of this is checked a boolean value but is true then it's going to execute this line
of code instead of the curly braces of this statement.
Here I can just type in boxing is checked OK.
And here as you can see the first argument is the context.
This next one is actually for actually showing the text to the user.
And here we are actually specifying the duration of the text that we are that we want to actually show
to the user.
And here we need to actually call the show effect on this object on this toast object in order to actually
to actually show this object to the user.
OK it is toast object.
And now as you can see let's actually see the other values here.
So as you can see here we put this break statement.
So it's going to actually break out of this break.
A switch statement.