本文实例为大家分享了Drawerlayout侧滑菜单的具体代码,供大家参考,具体内容如下Drawerlayout的xml布局<?xml version="1.0" encoding="utf-8"?><Re
本文实例为大家分享了Drawerlayout侧滑菜单的具体代码,供大家参考,具体内容如下
Drawerlayout的xml布局
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:Android="Http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="animtest.com.example.e531.drawerlayout_demo.MainActivity"> <!--侧拉菜单--> <android.support.v4.widget.DrawerLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drlayout"> <!--主页面的布局--> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/fcontent"> </FrameLayout> <!--拉菜单的布局 android:layout_gravity="start" 菜单在左边 end 菜单在右边 --> <RelativeLayout android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="end" android:background="#ffff00" android:id="@+id/rel"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher" android:id="@+id/img"/> <ListView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/lv" android:layout_below="@id/img"></ListView> </RelativeLayout> </android.support.v4.widget.DrawerLayout></RelativeLayout>
--结束END--
本文标题: Android Drawerlayout实现侧滑菜单效果
本文链接: https://www.lsjlt.com/news/220475.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0