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>

佈局能夠按本身想要實現的效果來佈局 這個效果我作的很醜 只當作例子把  讓美工作些好看的圖片來修飾它吧

效果

相關文章
相關標籤/搜索