-2

structure to implement

Hello currently I am working on android and I am stuck to implement the structure picture above.

  1. I need to add and delete the CardView in the list. I have tried it with RecyclerView and also used NestedScrollView to avoid double scroll, but I faced a problem that the animation is not available anymore when deletion because when deleting an item, the size of the recyclerView is forcibly reduced by NestedScrollView, so the animation cannot be operated normally.

  2. So what I want to know is if there is any way to implement it without NestedScrollView

  3. If not, how can I restore the animation working?

yongwoo
  • 65
  • 1
  • 1
  • 7

1 Answers1

0

NestedScrollView in this case is unnecessary. You'd better use RecyclerView only with multiple view item types

Hai Hack
  • 948
  • 13
  • 24
  • the pattern will be used more than the picture and sometimes I need to use horizontal cardviews.. is it still possible with your answer? – yongwoo Jul 08 '20 at 03:55
  • Yes, it is. Swing into action. Let me know if there are any problems. – Hai Hack Jul 08 '20 at 04:02
  • Thanks so much, but I still don't understand.. I have seen that I don't have to use the fragment inside recyclerview How can I solve that? you meant I have to use recyclerview in recyclerview? – yongwoo Jul 08 '20 at 04:10