0

How can i use expandable listview with viewpager.

I mean, when i click on the first child it would open a fragment layout, i can now swipe from that first child to the last child in that parent group without go back to the expandable listview.

Not just on the first child, i want to swipe from any child i clicked from the expandable listview.

enter image description hereThank you.

a_local_nobody
  • 7,947
  • 5
  • 29
  • 51
  • We call any "inline" additional view appearing (triggered by user) an "expandable", but right after asking for expandable, you talk about opening a ViewPager. Now, is the ViewPager the current workflow, and you want an expandable beside that? Or, do you *wrongly* use the term "expandable" for the act of opening an Activity? – Top-Master Mar 06 '22 at 09:06
  • It is true we can not use an activity in viewpager, we use fragment instead and we also know that viewpager are used to swipe from one fragment to another. I want when one of the Child is clicked on that fragment associated to that child group will open, then i can now swipe from that fragment to the next fragment on the parent group. My problem is that i don't know where to place the viewpager. Viewpager refuse to work in the same layout with the expandable listview. – Nwadinigwe Michael Mar 06 '22 at 09:54
  • Putting everything in the same layout is pretty slow, and pain to maintain. So if said `ViewPager` takes the entire screen, consider to use a `FragmentActivity` instead, else, if you meant a ViewPager is shown inside the list (as expandable's content), then you should post the minimal code to reproduce your issue(s). – Top-Master Mar 06 '22 at 20:17

0 Answers0