2

Background

on Firefox and Chrome apps for Android, if the user scrolls down, the upper actionBar starts to disappear.

if the scrolling is fast enough , it starts an animation to finish the disappearing, but if not, it returns to its normal state.

and there is a similar effect for showing the action bar, only that it's for scrolling up.

The problem

I need to have the same ability to make a customized view that is on the top of the screen (looks a bit like an action bar but it's not).

a part of the view will always be visible, but a part of it will shrink like in the effect of chrome and firefox.

I've looked for libraries that allow such a thing but without any luck.

The question

How can I achieve this behavior?

My guess is that I need to use the scrolling listener of the adapterView , but then what?

android developer
  • 114,585
  • 152
  • 739
  • 1,270

1 Answers1

2

I think this library can help, in the inner sample of "animation" :

https://github.com/LarsWerkman/QuickReturnListView

sadly i also use a customized pinterest-like listView, which doesn't report about scrolling (not states, but the real positions as you scroll). in fact it doesn't even extend from AdapterView.

android developer
  • 114,585
  • 152
  • 739
  • 1,270