直播app开发搭建,实现图片和视频列表展示、查看、删除等功能
直播app开发搭建,实现图片和视频列表展示、查看、删除等功能
布局media_item_title.xml(效果图中日期的布局)
1 | <?xml version= "1.0" encoding= "utf-8" ?><br><RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" <br> android:layout_width= "match_parent" <br> android:layout_height= "40dp" ><br> <br> <TextView<br> android:id= "@+id/txtTitle" <br> android:layout_width= "match_parent" <br> android:layout_height= "match_parent" <br> android:layout_marginTop= "7dp" <br> android:text= "TextView" <br> android:textColor= "@color/colorFontCommon" <br> android:textSize= "20sp" /><br></RelativeLayout> |
布局media_item_photo.xml(效果图中图片的布局),布局中添加了复选框,用来做删除功能时使用。
1 | <?xml version= "1.0" encoding= "utf-8" ?><br><RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" <br> xmlns:app= "http://schemas.android.com/apk/res-auto" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" ><br> <br> <ImageView<br> android:id= "@+id/imgPhoto" <br> android:layout_width= "200dp" <br> android:layout_height= "200dp" <br> android:layout_marginStart= "1dp" <br> android:layout_marginLeft= "1dp" <br> android:layout_marginTop= "1dp" <br> android:layout_marginEnd= "1dp" <br> android:layout_marginRight= "1dp" <br> android:layout_marginBottom= "1dp" <br> app:srcCompat= "@drawable/app_deploy" /><br> <br> <CheckBox<br> android:id= "@+id/chkSelect" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" <br> android:layout_alignParentRight= "true" <br> android:layout_alignParentBottom= "true" <br> android:visibility= "invisible" /><br></RelativeLayout> |
布局media_item_video.xml(视频的布局)
1 | <?xml version= "1.0" encoding= "utf-8" ?><br><RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" <br> xmlns:app= "http://schemas.android.com/apk/res-auto" <br> android:layout_width= "match_parent" <br> android:layout_height= "wrap_content" ><br> <br> <ImageView<br> android:id= "@+id/imgVideo" <br> android:layout_width= "200dp" <br> android:layout_height= "200dp" <br> android:layout_marginStart= "1dp" <br> android:layout_marginLeft= "1dp" <br> android:layout_marginTop= "1dp" <br> android:layout_marginEnd= "1dp" <br> android:layout_marginRight= "1dp" <br> android:layout_marginBottom= "1dp" <br> app:srcCompat= "@drawable/app_deploy" /><br> <br> <ImageButton<br> android:id= "@+id/btnPlay" <br> android:layout_width= "40dp" <br> android:layout_height= "40dp" <br> android:background= "@drawable/btn_play" /><br> <br> <CheckBox<br> android:id= "@+id/chkSelect" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" <br> android:layout_alignParentRight= "true" <br> android:layout_alignParentBottom= "true" <br> android:visibility= "invisible" /><br></RelativeLayout> |
以上就是 直播app开发搭建,实现图片和视频列表展示、查看、删除等功能,更多内容欢迎关注之后的文章
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
2022-05-12 短视频app制作,js获取日期、时间、星期多种样式
2022-05-12 短视频开发,生成随机的验证码数字
2022-05-12 短视频平台搭建,ios端延迟的执行方式,添加各种延迟