Android自学 -- 抽屉式菜单公告

mac2022-06-30  25

Android自学 – 抽屉式菜单公告

使用SlidingDrawer

例子:

<SlidingDrawer android:id="@+id/drawer1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:content="@+id/myView" android:handle="@+id/layout1" android:orientation="horizontal"> <!--设置引导按钮--> <LinearLayout android:id="@id/layout1" android:layout_width="35dp" android:layout_height="match_parent" android:gravity="center"> <ImageView android:id="@+id/myImage1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/open" /> </LinearLayout> <!--设置抽屉内容--> <ImageView android:id="@+id/myView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/iv_bg" /> </SlidingDrawer>
最新回复(0)