ANDROID实验报告组件布局.pdf
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
Android 开发 (实验五) 实验题目:Android 组件布局试验 指导老师: 班 级:计算机科学与技术系班 姓 名: 一、实验目的 1、掌握 Android 组件布局的使用方法 2、学会组件布局的重要属性与应用 3、能够根据需求,通过布局构建各类实际的页面。 二、实验内容 组 件 布 局 有 : LinearLayout 、 TableLayout 、 FrameLayout 、 RelativeLayout 三、实验步骤 1、用表格布局完成登录界面 <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFCC" android:stretchColumns="0,3" > <ImageView android:layout_width="fill_parent" android:layout_height="5dp"/> <TableRow> <ImageView android:layout_width="wrap_content" android:layout_height="100dp" android:src="@drawable/img" android:gravity="center" android:layout_span="4"/> </TableRow> <TableRow > <TextView/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" android:text="@string/username" android:textStyle="bold" android:textColor="#000000"/> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="left" android:minWidth="200px" android:id="@+id/ETname"/> </TableRow> <TableRow > <TextView/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" android:text="@string/password" android:textStyle="bold" android:textColor="#000000"/> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="left" android:minWidth="200px" android:inputType="textPassword" android:id="@+id/ETpwd"/> </TableRow> <TableRow> <TextView /> <Button android:id="@+id/Btok" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/button" android:textStyle="bold"/> <Button android:id="@+id/Btcancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:text="@string/cancel" android:textStyle="bold"/> </TableRow> </TableLayout> 2、使用线性布局完成系统主界面 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an
- 粉丝: 167
- 资源: 3万+
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助