- 14
- 0
- 约1万字
- 约 11页
- 2017-02-01 发布于北京
- 举报
(实验7深入理解Activity2
实验7 深入理解Activity
一、实验目的
1、掌握Activity的开发、配置和使用。
2、了解Activity的生命周期
二、实验内容与步骤
1、使用Bundle在Activity间交换数据(完成如下图所示程序)
图1:主界面
图2:点击注册按钮后
图3:点击确认按钮
图4:点击返回修改按钮
主界面Layout代码如下:
?xml version=1.0 encoding=utf-8?
TableLayout xmlns:android=/apk/res/android
android:layout_width=fill_parent
android:layout_height=fill_parent
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=请输入您的注册信息
android:textSize=20sp /
TableRow
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=用户名 :
android:textSize=16sp /
!-- 定义一个EditText,用于收集用户的帐号 --
EditText
android:id=@+id/name
android:layout_width=fill_parent
android:layout_height=wrap_content
android:hint=请填写想注册的帐号
android:selectAllOnFocus=true /
/TableRow
TableRow
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=密码 :
android:textSize=16sp /
!-- 用于收集用户的密码 --
EditText
android:id=@+id/passwd
android:layout_width=fill_parent
android:layout_height=wrap_content
android:password=true
android:selectAllOnFocus=true /
/TableRow
TableRow
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=性别 :
android:textSize=16sp /
!-- 定义一组单选框,用于收集用户注册的性别 --
RadioGroup
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=horizontal
RadioButton
android:id=@+id/male
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=男
android:tex
您可能关注的文档
最近下载
- 马兰士MA9S2功放利利用说明书.pdf VIP
- 人教版小学数学一年级口算比赛题库[全套].doc VIP
- (完整版)mems简介课件.pptx VIP
- 江苏省南通市通州区2024届高三第二学期期初质量监测化学试题附参考答案(解析).pdf VIP
- 《宋史_邵雍传》原文及译文.docx VIP
- 多学科会诊病例汇报ppt.pptx VIP
- 模型28 机械能弹簧模型(解析版)-2024高考物理二轮复习80模型最新模拟题专项训练.docx VIP
- 电力系统仿真:电力系统暂态仿真_(5).电力系统故障分析.docx VIP
- 2025北京丰台区初三一模道法试题及答案.pdf VIP
- 江苏省连云港等苏北七市联考2025-2026学年上学期高三高考物理一模试卷(含答案).pdf VIP
原创力文档

文档评论(0)