Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook-Notification like Pullable Screen

Can anybody point me to any public source where I can see how a pullable/draggable screen, like the one in the Facebook application for notifications, is implemented?

I have seen also this pattern in the application Öffi for DE/AT/CH/BE/UK.

Thanks for any help!

like image 425
adrianrdzv Avatar asked Dec 17 '22 19:12

adrianrdzv


1 Answers

It's actually easier than you think - SlidingDrawer is part of the Android SDK. Just define the layouts to use for your drawer handle and your drawer content and you're done. From the docs:

<SlidingDrawer
 android:id="@+id/drawer"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:handle="@+id/handle"
 android:content="@+id/content">

  <ImageView
       android:id="@id/handle"
       android:layout_width="88dip"
       android:layout_height="44dip" />

   <GridView
       android:id="@id/content"
       android:layout_width="match_parent"
       android:layout_height="match_parent" />

</SlidingDrawer>
like image 51
Yoni Samlan Avatar answered Dec 28 '22 07:12

Yoni Samlan