So first we created an array of group names.
This is actually a one dimensional array and then we created a two dimensional array.
OK.
And array of arrays and the name of this area.
Each child names.
OK so now let's actually declare our valuable of type context.
OK.
In order to specify the context of our activity of our application.
So if we have this context class and as you can see it actually automatically imported this context
the class to our activity here to our class and the name of this object is context.
OK.
And as you can see I didn't actually instantiate this object yet.
So I want to actually instantiated Venda actually and the constructor of this class of this class is
being called.
Ok so here I can just type in public.
OK expandable at least you adapter.
OK so remember the name of your constructor must be the same as the name of your class.
OK.
And then I put in a pair of brackets here are part of our practices as you can see here.
And here you can see and inside the prentices I can actually specify the arguments of these are constructor.
So here I can just type in context.
OK context.
So remember that context allows you allows this activity to actually interact with other features of
Android outside of this activity.
OK so we can't use context in lots of places in our Android application programming.
OK.
So this is very important.
So context allows this activity this class to interact with other features outside of this activity.
So we need to actually initialize this context so this that context assignment operator context and
then I need to put in a semicolon at the end of my statement here.
So as you can see here we have this great group of Kant here as you can see we are actually over writing
this method in our class.
OK.
So as you can see here it says return 0.
So here we need to actually return the number of elements that are inside of this group names here.
OK inside of this group names Ari.
OK.
So here I can just refer to the name of that a group names.
K Dot lenth.
OK.
And as you can see here you have these get.
She didn't count here.
And we need to actually implement this method here.
So as you can see it says get children out.
So we need to actually read through the name of this child names Ari.
OK.
And we need to actually get the value of the length of this array.
OK.
And then return That's right.
So here I can just type in child names dot Len.
OK.
And here as you can see if you have another MF it gets group OK.
So this method actually returns a value of type Object.
OK.
And the name of this method is get group.
And this if it actually accepts an argument of type integer and the name of this argument is group or
position.
So here we need to actually return the values that are inside of this get group names.
OK so here I can just typing that actually did it this null here.
Return group names.
OK.
Sup group position.
So it's going to actually return the specific value that is inside of the specific position specific
index actually of these Adli.
OK.
First we are referring to the name of this group names Aure.
And then we are actually referring to this specific index or position.
That is actually that is the inside of this at it.
OK for example a sports computer food car or TV.
OK.
So if you are returning that specific value OK from this method get group and we have our Get child
here and this method actually accepts our two arguments and this if actually returns a value of type
Object.
So here as you can see we need to actually return the values that are inside of these type names Ari.
OK.
So as you can see this is actually a two dimensional array.
So here for this method I can just return to the name of that of a child names.
OK.
Stop as you can see we you have two arguments group position type position.
So I can just type in group position.
OK.
Stop Child position.
OK so this is actually the row and this is the column.
So for example if we assigned the value 0 for this group position OK it's going to go inside of these
tightenings.
So this is the element zero.
OK.
Index 0.
And if if we actually assign the value 0 for this child position is going to return this value boxing
to us.
OK.
So in this if you are actually returning the value used other inside of these or child names.
Aure OK good child.
And we have another Meffert as you can see here gets group ID.
So here I could just return to group position.
That's OK.
So at the group position is the group ID the actually the index of our values inside of this group names.
OK.
So these for example this is index 0 1 2 3 4.
So these values would be the ID for these groupings.
OK.
So here as you can see I just returned to this group position and we have a child ID here.
As you can see here and as you can see for the Smurfette get child I.D. You have these child position
as an argument.
So if you could just retain that value returned child position.
OK.
So at this point he's going to return the specific index that are inside of this tightenings.
Ari for example index 0 1 2 free and other values.
OK.
So these are these are the columns and these are as you can see these arrows are actually the laws that
are inside of these child names Aure.
OK.
So if you are just returning to the index of the child position.
OK.
So these are the children of these.
OK.
These columns boxing kickboxing judo football basketball and other bodies.
So here are as you can see we have this I.D. And here we have these has stable IDs.
So the default implementation for this method is enough.
OK.
We don't need to actually override this method again.
And here we don't and you actually are putting our own implementations.
OK so now and as you can see here we can actually go to the web browser.
OK.
And he had as you can see this is our expandable adapter class and now I can actually search for the
name of that specific Misfit's that I want to actually see the actually the description of that method.
OK.
So here I could just press on hold the command key and then press on the letter F on my keyboard.
If you are using a Windows machine you need to actually hold the control key and and press on the letter
F on your keyboard.
And here inside the search bar as you can see I can get you to test for my specific methods has stable
stable IDs.
And as you can see here this is Meffert and this is actually an abstract method and the return type
of this method actually is boolean and it says indicates there the height and group ids are stable across
changes to the to the underlying data.
OK so this is the description of the Smurfit OK.
Let's actually go to the Android studio your ID.
So we don't need to actually override.
Actually we don't need to put our own implementations here.
OK so let's see what.
What is the other in my.
And we have this great group view.
OK.
And here as you can see if it actually returns a value of type view.
OK.
And this my friend actually accepts some arguments.
So the first argument is a group position of type integer.
The second argument is is expanded boolean.
The first argument is convert's view view.
So let's actually change the name of this argument to view and the first argument is the parent.
OK so if we have these values as an argument of the Smurfette.
OK.
So let's actually implement this method here.
So now I would 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 we have actually pasted these lines of code here.
OK.
And as you can see we don't need this line of code written on here and here first about in line sixty
eight.
I actually created an object of type text view and the name of this object is TXI The View assignment
operator new.
Here I am initializing this object takes view context.
So this takes view here as you can see this constructor.
The constructor of this text view class actually needs the context.
OK so I just assigned this context object that I actually declared inside of this class as you can see
here in line 21 and here in line.
I-69 I actually want to set some takes to this text view.
OK.
So takes the view that it takes group names.
So this nymphet gets confused when I try to return to us.
These are the values these group names as you can see here.
OK.
Sports computer TV.
OK.
So this Lifford is actually returning these values to the college of this method.
OK.
So we can see that this method is going to be called on each iteration of these values.
OK.
Sports computer food court TV.
OK so if the name of this is get group view.
OK.
So these are the group views.
OK.
And we actually created a text for you as you can see here.
That said text group names.
So I actually referred to these are group names.
Ari as you can see here these are the values that are inside of this emulator as you can see here and
here I actually put in a pair a pair of brackets.
Group position as you can see here.
So it's going to get you to return the specific value that is inside of this specific index or a specific
position of this group names.
OK so you can see these values here.