安卓给出代码:最上面有一行字”江苏科技大学“居中,字下面放置一个图片,设定长宽,使图片宽度为页面三分之一,高度是宽度的1.5倍。图片下面给出学号和姓名的输入文本框,图片下面分左右框。左边框第一行字是”专业“,下面放置三个单选框按钮,选项为”通信“”计算机“”软件工程“,下面再放置一个”确认“按钮;右边栏第一行字是爱好,下面放置三个多选按钮,分别是”打球“”电影“”网游“,下面放置一个”取消“按钮

时间: 2023-10-08 13:10:16 浏览: 33
以下是安卓代码实现: ```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="江苏科技大学" android:textSize="20sp" android:layout_centerHorizontal="true"/> <ImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="0dp" android:layout_below="@+id/title" android:src="@drawable/image_name" android:layout_weight="1.5" android:scaleType="centerCrop"/> <LinearLayout android:id="@+id/left_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/image" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="专业"/> <RadioGroup android:id="@+id/radio_group" android:layout_width="match_parent" android:layout_height="wrap_content"> <RadioButton android:id="@+id/radio_communication" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="通信"/> <RadioButton android:id="@+id/radio_computer" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="计算机"/> <RadioButton android:id="@+id/radio_software" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="软件工程"/> </RadioGroup> <Button android:id="@+id/confirm_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="确认"/> </LinearLayout> <LinearLayout android:id="@+id/right_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/image" android:layout_toRightOf="@id/left_layout" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="爱好"/> <CheckBox android:id="@+id/checkbox_sports" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="打球"/> <CheckBox android:id="@+id/checkbox_movie" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="电影"/> <CheckBox android:id="@+id/checkbox_game" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="网游"/> <Button android:id="@+id/cancel_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="取消"/> </LinearLayout> </RelativeLayout> ``` 注意:需要将 image_name 替换成你的图片名称。

相关推荐

最新推荐

recommend-type

Android自定义TextView实现文字图片居中显示的方法

下面小编就为大家分享一篇Android自定义TextView实现文字图片居中显示的方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
recommend-type

css中使input输入框与img(图片)在同一行居中对齐

如何让input输入框与img在同一行居中对齐,由于经常会使用到,默认情况下将input和img放同一行,img标签总是比input高出一个头,很难看,大家可以参考下本文或许有所帮助
recommend-type

input 文本框 文字垂直居中对齐 ie firefox

在ie中文字垂直居中对齐的话 在css中把line-height的属性设置成height的高度即可。但在ff中似乎不管用。
recommend-type

DIV+CSS垂直居中一个浮动元素

对于页面上的块级元素,只须定宽及设置margin:auto 0;即可在垂直上居中,但对于浮动的元素垂直居中是无效的。那么我们如何来处理这个问题呢,今天我们来探讨下。
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

MATLAB柱状图在信号处理中的应用:可视化信号特征和频谱分析

![matlab画柱状图](https://img-blog.csdnimg.cn/3f32348f1c9c4481a6f5931993732f97.png) # 1. MATLAB柱状图概述** MATLAB柱状图是一种图形化工具,用于可视化数据中不同类别或组的分布情况。它通过绘制垂直条形来表示每个类别或组中的数据值。柱状图在信号处理中广泛用于可视化信号特征和进行频谱分析。 柱状图的优点在于其简单易懂,能够直观地展示数据分布。在信号处理中,柱状图可以帮助工程师识别信号中的模式、趋势和异常情况,从而为信号分析和处理提供有价值的见解。 # 2. 柱状图在信号处理中的应用 柱状图在信号处理
recommend-type

hive中 的Metastore

Hive中的Metastore是一个关键的组件,它用于存储和管理Hive中的元数据。这些元数据包括表名、列名、表的数据类型、分区信息、表的存储位置等信息。Hive的查询和分析都需要Metastore来管理和访问这些元数据。 Metastore可以使用不同的后端存储来存储元数据,例如MySQL、PostgreSQL、Oracle等关系型数据库,或者Hadoop分布式文件系统中的HDFS。Metastore还提供了API,使得开发人员可以通过编程方式访问元数据。 Metastore的另一个重要功能是跟踪表的版本和历史。当用户对表进行更改时,Metastore会记录这些更改,并且可以让用户回滚到
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。
recommend-type

"互动学习:行动中的多样性与论文攻读经历"

多样性她- 事实上SCI NCES你的时间表ECOLEDO C Tora SC和NCESPOUR l’Ingén学习互动,互动学习以行动为中心的强化学习学会互动,互动学习,以行动为中心的强化学习计算机科学博士论文于2021年9月28日在Villeneuve d'Asq公开支持马修·瑟林评审团主席法布里斯·勒菲弗尔阿维尼翁大学教授论文指导奥利维尔·皮耶昆谷歌研究教授:智囊团论文联合主任菲利普·普雷教授,大学。里尔/CRISTAL/因里亚报告员奥利维耶·西格德索邦大学报告员卢多维奇·德诺耶教授,Facebook /索邦大学审查员越南圣迈IMT Atlantic高级讲师邀请弗洛里安·斯特鲁布博士,Deepmind对于那些及时看到自己错误的人...3谢谢你首先,我要感谢我的两位博士生导师Olivier和Philippe。奥利维尔,"站在巨人的肩膀上"这句话对你来说完全有意义了。从科学上讲,你知道在这篇论文的(许多)错误中,你是我可以依