Welcome back.
And this video, we are going to prepare to task list activity, so once you click onto a board, we
want to see all of the different tasks that are to be finished.
And that's what we're going to start with in this video.
Of course, we cannot finish everything that we need for in this video.
It's going to be a lot more.
But let's just start with the first steps.
So, first of all, I will create a new activity and set of my activities directory here or package
new.
Activity, empty activity, and I'm going to call it tells list activity.
Then let's go to the manifest, because here, because I'm going to apply the same rules to my activity
that I just created and it's at the very top here, this task lists activity.
And then.
We need to get rid of this activity in my case here, then the next thing that I want to set up is,
of course, here folks are in Port Arthur.
And then.
Get to the activity task list example and here aren't going to replace this with my other code, as
you can see here, I'm using a linear layout again with an app layout at the top, which has a toolbar
and then another linear layout which just has a recycle of you.
Now, padding is a new dimension.
So let's create that dimension value.
And let's go over to it now, we can assign a value to it.
Let's go ahead.
And I'm just going to use 10 density pixels here for the tasteless content padding.
Which is basically they're putting.
Between the layout and the risk of you, so let's look at it, you can see here we have a little padding
all around and these are the different items that inside of our RV task force, which is our recycler
view task.
This this one here.
For now, what I'm going to do is I'm going to go over to the main activity and just add an unclick
event for each and every single item in our list.
And that makes sense at the point where we create the listener adapter connection.
So.
It should be done.
At the point here.
Where we assigned the adapter.
OK, so this is where we can now add an uncle or listener to the adapter that set on Click Listener
for our adapter.
And of course, we need to create it in the board items adapters, so here for the adapter, which means
for the bought items adapter, I would like to have a set unclick listen their function because I have
an interface for our listener, but I don't have a function to set that on Click Listener.
So on Click Listener will be of type on Click Listener.
And here I'm just going to say that the click listener of this class should be the click listener that
is passed to this function.
OK, so that is this Arncliffe listener here should be the listener that is passed to our set unclick
listener function, which is basically going to be the one that I'm going to assign here in our main
activity.
So here I can just create a new one click listener and I'm just going to do it this way.
I'm just going to say object bought items adapter on Click Listener and now I can implement it.
So what I'm saying is I'm implementing the unclick listener interface that we created in our support
items adapter.
And I can just say what should happen once the unclick function is.
Triggered, and that will happen once we click on one of the adapter elements, which means one of the
item lists, so here, for example, on this board.
OK, so then this will be triggered, this unclick.
And for now, what I'm just going to do is I'm going to say, OK, start activity with the intent where
you just go ahead and go from this class to the class.
That is our task list activity.
OK, here, task list activity.
Colon, colon.
Class dot java.
Now, here, this doesn't seem to be enough.
It requires a context so I can add information to you that this statement, because it should be this
as the main activity and not something inside of our populated ports list.
So the thing is, we are inside of a closure here.
That's why we need to add this statement.
OK, so this admen activity and then we will start the activity now each time that we click on one of
the adapter elements.
All right.
Now let's test it and see if we are sent over to the other activity once we click on the board elements.
All right, so there's loaded now let's click on one of the boards and you can see we are sent over
to the other activity.
Let's try to get back.
Let's go to the other board.
Well, we don't have any details about the board yet, but that's what we're going to look at in the
next video.
So see you there.