Can anybody poi开发者_如何学运维nt 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!
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>
精彩评论