直播软件app开发,用户自定义头像选择
直播软件app开发,用户自定义头像选择
1.进行主界面的布局activity_main.xml
1 | <br><RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" <br> xmlns:tools= "http://schemas.android.com/tools" <br> android:layout_width= "match_parent" <br> android:layout_height= "match_parent" <br> android:orientation= "horizontal" <br> tools:context= ".MainActivity" ><br> <br> <ImageButton<br> android:id= "@+id/imageButton1" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" <br> android:layout_alignParentLeft= "true" <br> android:layout_alignParentTop= "true" <br> android:src= "@drawable/ic_launcher" /><br> <br> <EditText<br> android:id= "@+id/editText1" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" <br> android:layout_alignBottom= "@+id/imageButton1" <br> android:layout_marginLeft= "18dp" <br> android:layout_toRightOf= "@+id/imageButton1" <br> android:ems= "10" ><br> <br> <requestFocus /><br> </EditText><br> <br></RelativeLayout> |
2.进行对话框中组件的布局activity_show_gallery.xml
1 | <br><RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" <br> android:layout_width= "wrap_content" <br> android:layout_height= "wrap_content" ><br> <ImageSwitcher<br> android:id= "@+id/imageSwitcher1" <br> android:layout_width= "fill_parent" <br> android:layout_height= "fill_parent" <br> android:layout_alignParentLeft= "true" <br> android:layout_alignParentTop= "true" ><br> </ImageSwitcher><br> <br> <Gallery<br> android:id= "@+id/gallery1" <br> android:layout_width= "fill_parent" <br> android:layout_height= "wrap_content" <br> android:layout_alignParentBottom= "true" <br> android:layout_alignParentLeft= "true" <br> android:background= "?android:galleryItemBackground" <br> android:gravity= "center_vertical" <br> android:spacing= "3dp" <br> <br> /><br> <br> <br> <br></RelativeLayout> |
以上就是 直播软件app开发,用户自定义头像选择,更多内容欢迎关注之后的文章
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现