Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a vertically sliding fragment / panel like Google music in an Android app?

I'm trying to create a sliding panel that slides to collapse / expand vertically and not horizontally.

I've tried Umano's Library but it's kind of buggy for me, because I'm using Fragments, and not Activities.

Any way to implement this with fragments?

Thanks.

like image 926
Shahar Avatar asked Jun 12 '13 17:06

Shahar


1 Answers

that is called a SlidingDrawer (which is deprecated as of API level 17 BTW) so I would not recommend using it unless you fork it from the SDK as your own

SlidingDrawer Examples:

http://www.coderzheaven.com/2011/12/01/slidingdrawer-in-android-a-simple-example/

http://androiddeveloperspot.blogspot.com/2013/05/slidingdrawer-in-android-example.html

http://w2davids.wordpress.com/android-damn-that-sliding-drawer/

SlidingPaneLayout does this SlidingPaneLayout provides a horizontal, multi-pane layout for use at the top level of a UI. A left (or first) pane is treated as a content list or browser, subordinate to a primary detail view for displaying content.

you can view the sliding pane in the new hangouts app

like image 97
tyczj Avatar answered Oct 21 '22 05:10

tyczj