So now it's actually going inside this uncreate method as you can see here.
OK.
And when I actually are 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.
So here as you can see in line 60 I said that used the animation for Takes suture.
So here I am actually calling these Smurfette that I actually created here.
OK.
Use the animation for texture.
So this if it is going to actually put those animation effects on these or take suture objects.
So as you can see here inside this emulator if I click on this next button or this previous button we
can see those are animation effects.
OK.
So I am passing this take these take which objects to these methods.
OK.
For example this one is for this a sweeter one.
And this one is for this I take sweet two and this one is for these tapes which are free object.
OK.
As you can see if you have free the fence takes three years.
And now I actually paste in some lines of code here and then I'm going to explain to you what's going
on.
So as you can see here these are the lines of code that they actually paste that here.
OK.
And here in line 65 as you can see I actually called this May 5th create takes you by either reading
or the values of the three four takes through each year.
So as you can see here I created this method here as you can see.
And these are for actually accepts two arguments string values and text to each other.
So here are for the first argument I actually assigned this string values Von Schrader.
They actually created inside this class here in line 28 as you can see here.
And for the second argument I actually assigned this text which had object 1.
As you can see and here again I called that method again here.
And for the first argument scientists are string values to and for the second argument I assigned the
value.
This takes three to two.
And here I actually again called this method creates takes you by either reading over the values of
the add a fourth text sweeter.
And here again for the first argument I actually assign string values free and for the second argument
I assigned takes three free.
OK.
So hopefully that makes sense.
And now 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 pasted here and here as you can
see first of all I referred to the name of this button here.
Next one object as you can see inside the emulator and here this is our next button and this is our
previous button.
OK.
And here I am actually making this button a listener as you can see listening to the clicks of the use.
So if I click on this button something is going to happen.
OK.
So bit here next one that Stankovic listener.
And here inside Apprentice's we need to specify the context.
OK we need to specify the class that is going to be the listener of the clicks of the user.
OK.
You need to specify the class that this listener belongs to.
OK.
So here again in line 71 I with the name of the city and a private object.
So this is BT and prevent object as you can see that Stokley class and in main activity that this.
OK.
BT are next to that Satanical class and our main activity that this Pythian preach to a listener.
My main activity at this as you can see here and here Pythian our next free set unclick listener main
activity at this and here as you can see PTEN are pretty free.
That's what our calculus and our main activity that is.
OK so now I want to I need to actually as you can see it's not an error.
OK so we cannot actually run our project now because the compiler is actually complaining and we need
to fix something here and here because we are actually making these buttons.
I listen to the clicks of the user we need to actually implement the unclick listener interface in our
class.
Ok so here at the top you need to just type it here implements.
So main activity implements unclick listener interface unclick listener.
OK view that unclick listener.
OK.
So now because this unclick listener interface is actually abstract.
We need to actually implement the abstract methods that are inside of this class and or interface.
So here after the end in calibrates of each of these uncreate Smurfette you know here we need to actually
implement that Anklage my faith here on click Meffert and that he had need to press on until key on
my keyboard.
So now as you can see we can actually overwrite this ugly MF.
OK.
So inside of this Meffert I'm going to actually paste in 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 switch statement here as you can see.
OK.
So this is the statement that actually pasted here inside of this Uncle Fred.
OK.
And now when I explain to you what's going on here.
First of all I actually created a switch statement.
So each and inside the apprentice's I actually fed to the name of this object that we actually to receive
as an argument view OK this object is of type view.
So remember view the view class is actually the superclass of all of these components in actually and
right stick.
OK.
So if you want to actually differentiate between the buttons OK between these different buttons I can
actually use this view object in order to differentiate between those buttons.
When the user clicks on one of those buttons.
OK.
So here I can just type in each that gets ID.
OK so here and just switching between the ideas that are related to our objects so get to the bottom.
OK so we don't get ID.
And here inside is a switch statement.
I am saying that if the ID of our view as we can see it if the idea of our V object is PTEN next one
then execute this line of code here.
It takes Screecher want that show next here as you can see break.
And here we have case art that idea that and Livan takes through each one that show previous.
So as you can see here in the emulator we have these values here.
And if I click Next you can see the next value.
And if I click on previous As you can see we can see the previous value OK.
And here again if the value of this ID is a bit here next to then execute this line of code here takes
three to two.
That's your next break.
And if the value of this idea is PTEN P2 takes each to the previous bridge.
OK.
And as you can see here we have another text we show here.
And if I click on next and see the next value and if I click on previous You can see the previous value.
And here again we have another case statement case are that ID that's BTA next three take Sutor free.
That's your next break case or that Id that BT and briefly take take to read your previous break.
So here as you can see if you scroll down you can see that you have another take switcher and if we
click Next we can see this value the next value completely ASBI level up of course.
And if I click on a previous We can see the previous value complete objective see that of course.
OK.
So hopefully that makes sense.
OK.
And I think that's enough for this application and it's actually not our project and see what happens.
OK so now as you can see our application is actually running on this emulator.
OK.
And here you can see these values.
And if I actually click on the spot in here you can see these values actually are changing your cake.
And here here and actually if you scroll down here I can see these values change.
But as you can see here these buttons are not at the center of this screen.
OK.
So here are they're not actually horizontally centered.
They are actually horizontally centered.
But because if actually signed this we actually when we actually selected these linear layouts that
actually hold these image buttons of actually assigned the value wrapped content for these up linearly.
OK so if we actually change these values for the new outfits and for that they are for the layout and
for the layout height as you can see the assigned lap content.
OK.
And if we actually change this value it will match parent.
Let's see what happens.
As you can see match parent.
And now let's actually do our project again and see what happens.
And now as you can see these two buttons are actually at the center.
Actually there are they are horizontally centered on the screen.
OK.
And that's because this linearly out now is actually that lay outfits and the height of this linearly
out is match parent OK and match parent means the parent of this linearly.
So that part of this linearly out is this linearly outwards.
OK.
So here because we actually is trying to devalue match parents for these outfits and for the length
height of these linearly owls now because these two actually assigned the values centered horizontal
for the gravity of this linearly and vertical the components that are inside of this linearly are going
to be actually horizontally centered inside this linearly and actually horizontal OK.
But when you actually assigned the value wrapped content to the left and to the height of this linearly
or horizontal or the values are going to be centered.
OK.
Inside that specific linearly or horizontal okay but we cannot.
But when we actually got our application like this as you can see you cannot actually see that that
they are centered inside the linearly or horizontal but they are not centered in sight our screen.
OK but if we actually change that value that they have to feed and the height too much apparent.
Now they are actually centered horizontally in the screen.
OK.
So if I actually decide actually select the other linearly out.
OK.
And now I can actually change this outfit to to actually match a parent.
And then they have height to match parent.
OK.
I actually assigned the value of match parent for outfits and de-value Mattapan and for that they have
height for these two linear layouts here.
OK.
And now if I actually select all of these linearly out horizontally as you can see here the left with
as much apparent and the height is much apparent And as you can see here we cannot see Aldo's image
buttons any more here on this layer.
OK.
But if we actually did not our project here let's see what happens.
And now as you can see our application is running on the simulator and we can see that these image buttons
are actually centered horizontally correctly OK on our inside the screen.
OK.
And here we can see these values and here you can actually click on these image buttons in order to
change these values.
OK.