Android 组件的抽屉(初级)

Android 组件的抽屉(初级) android

本人一开始看到抽屉 效果的时候 本觉得颇有难度 结果……结果…….. ide

就这么一个SlidingDrawer组件 直接拖动到XML就实现了  超汗!!! 布局

code spa

<SlidingDrawer code

android:layout_width="match_parent" 图片

android:id="@+id/slidingDrawer1" it

android:layout_height="match_parent" io

android:handle="@+id/handle" class

android:content="@+id/content" grid

android:layout_alignParentBottom="true"

android:layout_alignParentLeft="true"

>

<Button

android:layout_width="wrap_content"

android:background="@drawable/gallery_background_1"

android:layout_height="wrap_content"

android:id="@+id/handle"></Button>

<LinearLayout

android:id="@+id/content"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:background="#CCFFFF">

<LinearLayout

android:id="@+id/content2"

android:layout_width="match_parent"

android:layout_height="80dp"

android:orientation="horizontal"

>

<ImageButton

android:id="@+id/Sp_w_picpathbutton1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:src="@drawable/a00"

android:layout_weight="1" 

android:background="@null"

android:layout_margin="10dp"

></ImageButton>

<ImageButton

android:id="@+id/Sp_w_picpathbutton2"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:src="@drawable/a01"

android:layout_weight="1"

android:background="@null"

android:layout_margin="10dp"

></ImageButton>

<ImageButton

android:id="@+id/Sp_w_picpathbutton3"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:src="@drawable/a02"

android:layout_weight="1"

android:background="@null"

android:layout_margin="10dp"

></ImageButton>

<ImageButton

android:id="@+id/Sp_w_picpathbutton4"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:src="@drawable/a03"

android:layout_weight="1"

android:background="@null"

android:layout_margin="10dp"

></ImageButton>

</LinearLayout>

<Button

android:id="@+id/Sbutton1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_margin="15dp"

android:text="1111111"

android:layout_marginTop="15dp"

></Button>

<Button

android:id="@+id/Sbutton2"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_margin="15dp"

android:text="222222"

></Button>

<Button

android:id="@+id/Sbutton3"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_margin="15dp"

android:text="333333"

></Button>

<Button

android:id="@+id/Sbutton4"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_margin="15dp"

android:text="13424顺序各点6"

></Button>

</LinearLayout>

</SlidingDrawer>

布局能够按本身想要实现的效果来布局 这个效果我作的很丑 只当作例子把  让美工作些好看的图片来修饰它吧

效果