This article explains how to use a SlidingDrawer in your activity. A SlidingDrawer hides the content from the screen and allows the user to bring content onto the screen. You can use a sliding drawer vertically or horizontally or both. A SlidingDrawer can only be used inside a RelativeLayout and FrameLayout. In the XML file, you will use a SlidingDrawer with one button to handle the layout and an imageview that you want to drag.
In a Java class file, you will set the SlidingDrawer on setOnDarwablwCloseListener that closes the sliding drawer when you will click on the handle button. Inside the onDrawableClose you will set the handle button on the setBackgroundResource that sets the background resource on button click. After this, to open the sliding drawer you will set the SlidingDawer on setDawableOpenListener that opens the drawer when you will click on the handle button.