Note that there are some explanatory texts on larger screens.

plurals
  1. POBest practice for an ExpanableListView and its Adapter
    text
    copied!<p>I have a best practice question to make sure I'm doing this in the most efficient way. I have an application that contains an expandable list view. This view has three subsections to it, for the sake of an example lets call them active, idle, and inactive. The data backing this list, lets call them nodes, can either be a parent or a child of a parent. Currently I'm registering to changes in the database and am manually managing this UGLY List of nodes that contain a list of parents with each parent having a list of children (i.e. I'm manually adding/removing each parent/child as needed). Now, if this was a relatively stable database it would be fine the way I have (ugly and most likely inefficient, but fine), but the database is constantly changing with new parents being added, children changing into parents, or children changing parents, and nodes changing states (active, idle, and inactive). Even with the constant changes, it seems to perform okay when the database is small but as I start getting more and more parent and child nodes the UI slows to a halt.</p> <p>So what I'm looking for is the best adapter/method I should use in this kind of scenario. Currently I just have an extension of the BaseExpandableListAdapter behind the ExpandableList and manage that ugly data structure I described above (the list of objects with lists of objects). I'm trying to refactor this functionality into something more understandable and efficient and am looking for ideas. I thought perhaps I could stick with the BaseExpandableListAdapter in combination with an AsyncTaskLoader or somehow incorporate a SimpleCursorTreeAdapter. Just looking for ideas from people who might know more tricks than I</p> <p>Thanks in advance,</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload