Sliding menu: closed, half-opened and opened

980 views Asked by At

in an android application, I need to do the following:

I have a view, that acts like a menu, I can slide it from the bottom-up. However I want to have 3 states: closed, half-opened and opened.

Please refer to this pic:

Closed. half-opened. opened

The blue section is the Handle, the user will use it to slide up/down or fling...

This is a bit similar to the android 5 notification bar, where you drag down to reveal half the view, then another drag down will reveal the whole view.

I can start implementing it in the onTouch of the blue section but that would require me to handle a lot of cases, especially the ones where the user flings vs slowly drag.... Is there any easier way or library that can help?

Thank you very much

0

There are 0 answers