Android Sliding Drawer
DOWNLOAD SOURCE CODE
There are two main important component
i added android sliding drawer code with screen shot also... please find and check it.
it is use full for creating short cut menu like that only.
screen shot
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:gravity="bottom" >
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="50dip"
android:orientation="vertical" android:gravity="bottom" android:background="@drawable/vijayakumar">
<TextView
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:paddingLeft="5dip"
android:textSize="17dip"
android:layout_width="wrap_content"
android:text="iamvijayakumar.blogspot.com" />
</LinearLayout>
<SlidingDrawer android:layout_width="wrap_content" android:id="@+id/SlidingDrawer" android:handle="@+id/slideHandleButton" android:content="@+id/contentLayout" android:padding="10dip" android:layout_height="250dip">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/slideHandleButton" android:background="@drawable/closearrow"></Button>
<LinearLayout android:layout_width="wrap_content" android:id="@+id/contentLayout" android:orientation="vertical" android:gravity="center|top" android:padding="10dip" android:background="#C0C0C0" android:layout_height="wrap_content">
<Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page1"></Button>
<Button android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page2"></Button>
<Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page3"></Button>
</LinearLayout>
</SlidingDrawer>
</LinearLayout>
DOWNLOAD SOURCE CODE
There are two main important component
- Sliding Handler - This is the one contains handler button that is always visible in the application.
- Sliding Container - The object container that animate slide up/down to show the objects.
i added android sliding drawer code with screen shot also... please find and check it.
it is use full for creating short cut menu like that only.
screen shot
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:gravity="bottom" >
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="50dip"
android:orientation="vertical" android:gravity="bottom" android:background="@drawable/vijayakumar">
<TextView
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:paddingLeft="5dip"
android:textSize="17dip"
android:layout_width="wrap_content"
android:text="iamvijayakumar.blogspot.com" />
</LinearLayout>
<SlidingDrawer android:layout_width="wrap_content" android:id="@+id/SlidingDrawer" android:handle="@+id/slideHandleButton" android:content="@+id/contentLayout" android:padding="10dip" android:layout_height="250dip">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/slideHandleButton" android:background="@drawable/closearrow"></Button>
<LinearLayout android:layout_width="wrap_content" android:id="@+id/contentLayout" android:orientation="vertical" android:gravity="center|top" android:padding="10dip" android:background="#C0C0C0" android:layout_height="wrap_content">
<Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page1"></Button>
<Button android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page2"></Button>
<Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Page3"></Button>
</LinearLayout>
</SlidingDrawer>
</LinearLayout>
how to modify this to sliding from left to right..?
ReplyDeleteHi vijay what ever the link you are given to download the source code is not working.
ReplyDeleteHi,
DeleteThat website was hacked thats why it's not working.. soon i'll upload another server.