This article from http://blog.csdn.net/hellogv/, welcome to pick, quote must indicate the source!
Last introduced the basic article, explained the custom Drawer Control Foundation implementation, this time on the basis of the basic article to add the drag function. Drag-and-drop functionality based on Gesturedetector,gesturedetector basic usage is not the focus of this article, and interested children's shoes can be connected to the Internet to inquire about tutorials.
The drawer controls in this article have the following features:
1. Support Gesture dragging
2. When you drag to half, you can expand or shrink automatically.
The following figure:
The source code of this article can download here: http://download.csdn.net/detail/hellogv/3642418
Only post the source of the drawer components, other source files and the same as the basic article:
View Plainprint? <span style= "Font-family:comic Sans ms;font-size:18px;" >public class Panel extends LinearLayout implements gesturedetector.ongesturelistener{public interface Panelclosede vent {void onpanelclosed (View panel);