Android 组件的抽屉(初级)
使用抽屉分隔器将抽屉内的小物件分类,如文具、工具或首饰。 #生活技巧# #组织技巧#
Android 组件的抽屉(初级)
本人一开始看到抽屉 效果的时候 本以为很有难度 结果……结果……..
就这么一个SlidingDrawer组件 直接拖动到XML就实现了 超汗!!!
上code
<SlidingDrawer
android:layout_width="match_parent"
android:id="@+id/slidingDrawer1"
android:layout_height="match_parent"
android:handle="@+id/handle"
android:content="@+id/content"
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>
布局可以按自己想要实现的效果来布局 这个效果我做的很丑 只当做例子把 让美工做些好看的图片来修饰它吧
效果
网址:Android 组件的抽屉(初级) https://www.yuejiaxmz.com/news/view/234288
相关内容
抽屉组件抽屉软件
抽屉组件的制作方法
我的世界储物抽屉组件详情【详解】
一种分隔件及抽屉组件.pdf
怎么组装抽屉?格子抽屉怎么组装? – 范的资源库
【组合抽屉式收纳柜】组合抽屉式收纳柜价格
抽屉分割隔板自由组合抽屉收纳
组织垃圾抽屉
抽屉配件