Sliding menu: closed, half-open and open

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

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

Please refer to this picture:

Closed.  half-opened.  opened

The blue section is the handle, the user will use it to move up / down or drop ...

It's a bit like android 5 notification bar where you drag it to show half of the view, then another drag will show the whole view.

I can start implementing it in the onTouch of the blue section, but that will require me to handle many cases, especially those where the user is throwing against slow resistance .... Is there an easier way or library that might help?

Many thanks

+3


source to share





All Articles