0

I don't have any idea how to do . Please guide me to do the coding.. Actually , I am having recycler view and it has more than 10 items . But I need to show only top 4 items and need to add " view more " lbl or button ,if user clicks this lbl,recycler view show expand . I have attached one video. I don't know where to start.
https://vimeo.com/316969873

Saranya Subramanian
  • 417
  • 1
  • 5
  • 19
  • 1
    For your info , your video is private , we cannot see it – Manohar Feb 13 '19 at 07:39
  • If you want expansion and collapse as well as you have fixed items in list then instead of using "Recyclerview", use "ExpandableListView" – Sushant Poman Feb 13 '19 at 08:03
  • @ManoharReddy ,now you can see it – Saranya Subramanian Feb 13 '19 at 08:53
  • So the simplest way will be take the View "View all recent location" below recyclerview . When initializing recycler view adapter , in list which you passing to adapter add only 4 items . when user clicks on "View all recent location" then add all items to list and update adapter . – Manohar Feb 13 '19 at 08:58
  • @ManoharReddy ,what about height of recycler view ? Suppose if I have only 2 elements ???? My recycler view height is not updating dynamically .And wrap content not working.. I have only 100dp height for this part. So height of recycler view should be less than 100dp or equal to 100dp – Saranya Subramanian Feb 13 '19 at 09:01
  • Don't fix the height of recyclerview keep height wrap_content , keep complete layout in a nested scroll view . And for recycler view set nestedScrollingEnabled as false programatically in java. – Manohar Feb 13 '19 at 09:03

0 Answers0