Transparent Sticky Headers

360 Views Asked by At

Tl;dr: Sticky recycler view headers that are also transparent seem impossible. Any wisdom would be greatly appreciated.

I'm looking to build out a UI with a similar sticky header effect to the Apple Music app (example). Unfortunately this is a hard feature to implement. I have found no one who has done this before in the Android coding community.

Things I've tried:

  1. Overlay a custom view (header lookalike) and try to keep it in sync with the scroll state of either a recycler view or scroll view
  2. Constantly grab a bitmap of the view behind where the sticky part should be and add it to the sticky headers

Issues with the above ^

  1. Since you need to move the scrolling view up and down depending on the state - this has been unusable given the jittery nature of moving while scrolling
  2. This kills most any device since it requires a decent amount of RAM to keep running (plus it just feels gross)

Lastly... I want to make it clear that I'm not looking for a code snippet to save the day. I'm simply looking for some general direction that others may also benefit from. If you've done something like this before - please chime in.

1

There are 1 best solutions below

1
On

teak a look at this FlexibleAdapter I'm sure you can find your solution there or at lees get some idea of how to solve your problem.