So now it's actually to go to the Android studio again and here as you can see it's showing us an error
and it says that class customized list view must either be declared abstract or implement abstract method
get count in adapter.
So if you have some abstract methods that we need to actually implement in our class.
But first of all it's actually adding some more lines of code here.
So inside of this customized Lisp Violette's actually declare two objects.
So I'm going to just paste two 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 two objects that I actually declared inside of these are customized
to your class.
So first of all about inline 12 I actually declared an object of type context.
OK so what is in context.
So let's actually go to the Android documentation in order to see what is a context.
As you can see this is the context class and here it says interface to global interface.
About an application environment.
This is an abstract class whose implementation is provided by the Android system.
It allows access to application specific resources and classes.
Ok so if we can actually get access to the application specific resources and classes by using this
context class okay as well as up calls for application level operations such as launching activities
broadcasting and receiving intense intense et cetera.
So now let's go to the Android studio.
So here we needed to actually create an object of type context.
So I just declared this object in inline 12 and inline 14.
I declared an object of type lay out inflator.
OK so what's the job of this layout.
Inflator object the inflicted object is going to actually inflate this.
Customize this view as you can see here is going to actually inflate this customize this view.
And these are List view that we actually put inside of this content underline made that example.
So let me explain again this layout inflator object is going to inflate.
These are customized list view on this list view of object that you actually put inside of this content.
Underline that example.
OK.
So here let's actually go inside this because customize the list view of a file.
And here it's actually declared as some arrays here.
Now I'm going to actually pasting the 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.
OK.
First of all I created an array of integer values and as you can see here are the name of my art.
Art is animal images.
OK.
Assignment operator and here I am actually instantiating this tree.
OK.
So inside of these curly braces I actually assigned some values.
So what are these values.
These values are actually are the ideas of the resources that we have in our project.
So inside of this triable folder as you can see we have these images.
OK.
So in order to refresh these images I just typed in here are OK that triable.
So he had referred to this tribal folder that's there.
So I just referred to this bear that PNB image here OK.
So it is actually an ID of this image inside of our project.
OK.
So that's why we actually created a valuable of our integer values.
OK.
An array of integer values.
Ok so the type of our array is int.
As you can see here and we have as you can see our trouble that beard here I am referring to this image
we have our thoughts drawable that chance we have we are actually referring to this image here and we
have our thought triable that ciao.
And here I am referring to this image.
Our thoughts are triable that Dalfin this image are Roybal that fish this image are that are triable
that Fox this image.
And here as you can see Artaud to throw a belt that holds this image.
And as you can see we have two other images here are that triable that live in this image.
And these are triable the tiger this image.
OK.
So now as you can see I am referring to the two those images in my project.
OK.
And here I created another array as you can see here.
And this is actually of type.
Strange as you can see I have an array of string values.
The name of this area is animal names.
And then I assigned somebody to this addy.
OK so bear.
Ok bear.
Chad's a cow.
So as you can see here.
Order is important here.
The other must be this must be the same as the order of these images of these ideas that are actually
assigned to these images.
Ari OK.
And here as you can see I am I actually created an order of array of type integer values animals power.
And these are the value of the power of these animals that are assigned to these arrays here as you
can see.
And I have another array.
He had animals speech and he had as he can see these are the values that are related to these animals
here that we have in our project.
OK.
These are as you can see the order is really important here.
For example this number 50 is for this bear animal.
This is for these a bird animal here.
OK.
So now let's actually adding some more lines of code in our our class.
OK.
So I'm gonna paste in some lines of code here and then I'm going to explain to you what's going on here.
So now I want to actually create a constructor for this customized list your class here.
So I'm just gonna paste it here.
As you can see this is a constructor for this.
A customized list for your class.
And as you can see here this construct it actually accepts a value of type context.
OK as you can see and the name of this argument is context.
OK.
And inside of this are constructed first of all I am actually instantiating this a constant object as
you can see here that I actually declare it inside of this customized List View class destock context
assignment operator context.
OK.
And then in line 29 I am actually instantiating this out inflated object so Layla's inflator assignment
operator and here first of all I am actually casting this object to our left inflator on here I'm just
referring to this context argument as you can see here context that gets system service OK.
Context that lay out inflator service OK.
So this is how you actually get the lay out.
Inflator service and you can and then it can actually assigned that value to these inflated object here.
So now because we are implementing this base adapter because we are actually extending this base adapter
class.
OK.
So there is an ease of relationship between these two classes.
So customized list view ease up base adapter.
Okay.
And now we need to actually implement some abstract methods because ideaspace it after class is actually
an abstract class.
And here inside of this customized list view we need to implement some abstract methods.
OK.
So here in order to implement those abstract benefits just right click inside of this class OK.
Right click on it and click on generate and then click on implement Misfit's.
OK.
As you can see here and as you can see here these are the methods that we need to actually implement
inside of the inside of our class.
As you can see it says Android that widget that adapter.
And these are the effects that we need to implement here.
OK.
So just select all of these methods and then click on OK.
So as you can see here it's actually a pace that fits inside of this class.
OK.
The first is it gets out.
The second is a as you can see gets id..
Get MIT and get a view.
OK so now let's actually go inside this guess counterfit and delete this line of code.
And now we can actually put in our own implementations inside of this method.
So this method as you can see here it wants are the count of our objects.
OK.
So we have a free arrays here.
And the size of these free arrays is actually the same.
Ok so now I can actually refer to the name of this animal images of a as you can see here inside of
these counterfit animal images.
That's learn and then I need to put in a semicolon here and here I need to return the right.
Disvalue return animal images that live.
So this would be the count of objects.
OK.
And as you can see here is the second Mefford is good item and the return type of this method is object.
OK.
So we need to actually return a value of type Object.
OK.
And this method actually accepts an argument of an integer and the name of this argument is position.
So just delete this null here and now we know that at least if it wants this specific item in our array.
OK so these are the values that are inside of our arrays as you can see here.
So I could just refer to the name of this animal images array.
OK.
Animal images.
OK.
Sup position.
So here it can actually go inside of our array for example this animal images are a.
And then it's going to return the specific value that is inside of this position here.
As you can see here.