Android开发—弹出列表、单选、多选框
最新推荐文章于 2024-04-22 11:16:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
效果图如下:
需要建一个menu
xml布局如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.lyp1020k.lv.MainActivity"
android:orientation="vertical">
<Button
android:id="@+id/button1"
android:text="列表框"
android:onClick="showList"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@
08-15
1903
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-18
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交
评论
![](https://csdnimg.cn/release/blogv2/dist/pc/img/closeBt.png)
![](https://csdnimg.cn/release/blogv2/dist/pc/img/closeBt.png)
![](https://csdnimg.cn/release/blogv2/dist/pc/img/commentArrowLeftWhite.png)
![](https://csdnimg.cn/release/blogv2/dist/pc/img/iconPark.png)
查看更多评论
![](https://csdnimg.cn/release/blogv2/dist/pc/img/commentArrowDownWhite.png)
添加红包
![](https://csdnimg.cn/release/blogv2/dist/pc/img/guideRedReward02.png)
![](https://csdnimg.cn/release/blogv2/dist/pc/img/guideRedReward03.png)