(实验7深入理解Activity2.docVIP

  • 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

文档评论(0)

1亿VIP精品文档

相关文档