Android简单练习(TableLayout)
来源:互联网 发布:淘宝的主营业务 编辑:程序博客网 时间:2024/06/09 21:26
安卓简单布局
新建安卓项目:UILayoutTest
MainActivity.java
package com.example.uilayouttest;import android.app.Activity;import android.os.Bundle;import android.view.Window;public class MainActivity extends Activity{ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); }}
XML文件
title.xml<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchColumns="1" > <TableRow> <TextView android:layout_height="wrap_content" android:text="Account:" /> <EditText android:id="@+id/account" android:layout_height="wrap_content" android:hint="请输入你的账号" /> </TableRow> <TableRow> <TextView android:layout_height="wrap_content" android:text="Password" /> <EditText android:id="@+id/password" android:layout_height="wrap_content" android:inputType="numberPassword" /> </TableRow> <TableRow> <Button android:id="@+id/Login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="2" android:text="Login" /> </TableRow></TableLayout>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <include layout="@layout/title" /></LinearLayout>
运行效果如图所示
2015年8月31日22:51:48
0 0
- Android简单练习(TableLayout)
- Android布局(三)TableLayout
- Android TableLayout(表格布局)
- android TableLayout
- android&&TableLayout
- android tablelayout
- Android tablelayout
- Android TableLayout
- android tablelayout
- android Tablelayout
- android界面布局----TableLayout(表单布局)
- Android布局之TableLayout(表格布局)
- android布局之表单布局(TableLayout)
- Android布局之TableLayout(表格布局)
- 【Android布局之【TableLayout(表格布局)】
- android学习笔记02(TableLayout)
- Android初试--TableLayout(表格布局)
- Android UI之TableLayout(表格布局)
- iwi的模板
- Intellij idea 中 JUnit 的简单配置
- 求余数
- 延迟操作
- uva 11275 - 3D Triangles(几何)
- Android简单练习(TableLayout)
- intellij常用快捷键
- HDU 5423 Rikka with Tree(DFS)
- maven项目管理之-06-pom.xml说明
- java学习笔记--入门
- CSFB技术概述
- IT职场人生系列之四:怎样写简历
- uva 1469 - Ardenia(几何+分数)
- 开发完的思考