Reputation: 53
I am working on an android application that I like to do something like this picture below to a listview:
as you can see, there's a custom adapter for a list view that generates a list out of one of my classes. I want to add a view like a Linearlayout or something under a Listview item after I clicked it. how can I do that? PS: where I have to put an onItemClickListener()? in my adapter's class or in my main page after onCreate() method? PPS: in the picture, I meant SUBITEM FOR ITEM1... sorry...
Upvotes: 1
Views: 2515
Reputation: 12375
You essentially want to do what this person does with a ViewStub
, and implement an OnClickListener
that is attached to each ListItem
.
Please let me know if that is not clear or if you can't find a good example, and I'll see what I can do. :)
Upvotes: 0