1

I want to put several views above RecyclerView, when user scrolls screen, views and recyclerView can scroll together.

Like this:

<com.bigkoo.convenientbanner.ConvenientBanner />

<LinearLayout>
    <Button /><Button /><Button />
</LinearLayout>

<android.support.v7.widget.RecyclerView />

I can only find out two ways to do it:

  1. Put them into a ScrollView, but it makes RecyclerView load all items, it waste lots of memory.
  2. Put views as RecyclerView's items, but it makes my adapter so ugly, and when user scrolls RecyclerView to bottom, Banner view will be release, which makes images of banner load again, and back to first image.

Is there any elegant way?

Views above RecyclerView

anuradha
  • 692
  • 1
  • 9
  • 22
  • This answer is definitely not a duplicate. The answer that links to the duplicate, doesn't answer the same doubt I have. – jamian Nov 11 '18 at 04:24

0 Answers0