android nested listview

后端 未结 5 2197
别跟我提以往
别跟我提以往 2020-11-27 05:15

is it possible/advisable to have a nested listview?

i.e. a listView that\'s contained within a row of another listview?

an example would be where my main lis

5条回答
  •  难免孤独
    2020-11-27 06:02

    You'd better use one ListView, not nested. Nesting ListView is an inefficient way. Your ListView may not scroll smoothly and take up more memory.

    You could organize your data structure to show nested data in one ListView. Or you can use this project PreOrderTreeAdapter. It is convenient to show nested data in ListView or RecyclerView. It can be used to make ListView or RecyclerView collapsible, just change the way you provide your data than notify the adapter.

提交回复
热议问题