The task is to make the output of several ListView on one screen. Type different categories and under each category a list of category items. But something turned out to be more difficult than I thought. I made it all fragments. In the code, fragments were dynamically added with the layout (which contains a ListView list of items and a category title TextView ) into the container. There were a lot of fragments on the screen with a ListView . As it is called ListView it is impossible to ScrollView in ScrollView because ListView starts to be strange and displays only 1 element from the entire list. I decided to go the other way and instead of the ListView I made fragments with my adapter. That is, instead of dynamically adding fragments, I made a ListView that inserts the same layout , just not as a fragment, but as a fragment of a list. To implement this, I reimplemented SimpleAdapter and added initialization of nested ListView . But the same problem. Only one list item is displayed. In addition, the list items are no longer clicked and do not respond to clicks at all. What to do? How to make the implementation I need?

  • one
    And the solution with one listview and 2 cell types (1 for a category, 2 for elements) does not fit? - Yury Pashkov
  • @Yury Pashkov Type instead of ListView to make a hands list? - MediaPortal
  • No, you will have one listView, it will simply display two types of cells, one will be responsible for the category, the second for the category element, and the 1st category will appear in the list, its elements will follow, and so on, the 2nd and its elements ... and all without fragments. just in the layout of the activit will be a listview - Yury Pashkov
  • Look at this answer for the implementation of lists with two types of items - pavlofff

0