I’m working on a project that has an ExpandableListView nested inside a regular ListView. I think I have over complicated my data/view structures. The reason for doing this is because I’m using this viewflow library which requires my views be in a ListView. Inside my main layout View (which from here will be referred to as a page that go’s into the viewflow ListView) I have an ExpandableListView. This is all made more complicated by the fact that the pages views are created in code and not separate view activities. Here’s some diagrams to help make it a little clearer.

I want to get the data from here

I can get all my information displaying correctly for each of the individually, code created pages. The problem is that I am unsure of how I can retrieve the data held inside the ExpandableListView for each of the pages. I’ve tried keeping track off all the ExpandableListViews generated in an ArrayList then looping through it to create the OnChildClickListeners. The code compiles and runs fine but the click listener is never called.
My first guess is that since the pages are being created programmatically (thus so are the ExpandableListViews) their IDs are being changed and so the click listener is being registered else where.
Some code you say! Well I’m not too sure what code I need to provide and to paste it all would be ridiculous. If there is a section you would like to have a look at (for example the page generation) just let me know and I’ll update the question.
I managed to get this working by getting the
ExpandableListViewby ID in my customListViewcontroller. I then passed the viewflowListViewmy custom controller which I could then access from the top level. In theory the idea was to pass everything back one level and in the end it got there!