andorid 三种方式的练习
layout1 线性布局
<?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"> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="To"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Subject"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Message"
android:textSize="20dp"/> <EditText
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="bottom"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"> <Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Reset"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Send"
android:layout_weight="1"
/> </LinearLayout>
</LinearLayout>
layout2 表格布局
<?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,2">
<TableRow>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="To"
android:layout_span="2"/>
</TableRow>
<TableRow>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Subject"
android:layout_span="2"/>
</TableRow>
<TableRow>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Message"
android:textSize="20dp"/>
</TableRow>
<TableRow
android:layout_marginTop="300dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_span="2" />
</TableRow>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="0dp"
android:text="reset"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="0dp"
android:text="send"
android:layout_weight="1"/>
</TableRow> </TableLayout>
layout3 网格布局
<?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"> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="To"
android:id="@+id/to"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Subject"
android:layout_below="@id/to"
android:id="@+id/sub"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Message"
android:textSize="20dp"
android:layout_below="@id/sub"
/>
<Button
android:layout_width="190dp"
android:layout_height="wrap_content"
android:text="send"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:id="@+id/sen"
/>
<Button
android:layout_width="190dp"
android:layout_height="wrap_content"
android:text="reset"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/sen"
/> </RelativeLayout>
andorid 三种方式的练习的更多相关文章
- Android 使用OpenCV的三种方式(Android Studio)
http://blog.csdn.net/sbsujjbcy/article/details/49520791 其实最早接触OpenCV是很久很久之前的事了,大概在2013年的5,6月份,当时还是个菜 ...
- 监视EntityFramework中的sql流转你需要知道的三种方式Log,SqlServerProfile, EFProfile
大家在学习entityframework的时候,都知道那linq写的叫一个爽,再也不用区分不同RDMS的sql版本差异了,但是呢,高效率带来了差灵活性,我们 无法控制sql的生成策略,所以必须不要让自 ...
- iOS字体加载三种方式
静态加载 动态加载 动态下载苹果提供的多种字体 其他 打印出当前所有可用的字体 检查某字体是否已经下载 这是一篇很简短的文章,介绍了 iOS 自定义字体加载的三种方式. 静态加载 这个可以说是最简单最 ...
- 0036 Java学习笔记-多线程-创建线程的三种方式
创建线程 创建线程的三种方式: 继承java.lang.Thread 实现java.lang.Runnable接口 实现java.util.concurrent.Callable接口 所有的线程对象都 ...
- 【整理】Linux下中文检索引擎coreseek4安装,以及PHP使用sphinx的三种方式(sphinxapi,sphinx的php扩展,SphinxSe作为mysql存储引擎)
一,软件准备 coreseek4.1 (包含coreseek测试版和mmseg最新版本,以及测试数据包[内置中文分词与搜索.单字切分.mysql数据源.python数据源.RT实时索引等测 ...
- JDBC的批处理操作三种方式 pstmt.addBatch()
package lavasoft.jdbctest; import lavasoft.common.DBToolkit; import java.sql.Connection; import java ...
- 【Java EE 学习 52】【Spring学习第四天】【Spring与JDBC】【JdbcTemplate创建的三种方式】【Spring事务管理】【事务中使用dbutils则回滚失败!!!??】
一.JDBC编程特点 静态代码+动态变量=JDBC编程. 静态代码:比如所有的数据库连接池 都实现了DataSource接口,都实现了Connection接口. 动态变量:用户名.密码.连接的数据库. ...
- Java设置session超时(失效)的三种方式
1. 在web容器中设置(此处以tomcat为例) 在tomcat-6.0\conf\web.xml中设置,以下是tomcat 6.0中的默认配置: <!-- ================= ...
- angularjs 自定义服务的三种方式
angularjs 中可通过三种($provider,$factory,$service)方式自定义服务,以下是不同的实现形式: // 定义module , module中注入$providevar ...
随机推荐
- android listview中item通过viewpager实现《IT蓝豹》
android listview中item通过viewpager实现 android listview中item通过viewpager实现,每一个item都支持viewpager实现图片切换功能.本项 ...
- 吴裕雄 oracle 存储过程
- scrapy爬虫的编写步骤
scrapy的步骤: a.编写item,爬取的各个属性 b.编写spider,name 要和 scrapy crawl xxspider一致,里面编写parse的信息,就是xpath获取item的各个 ...
- sql-mybatis-多表查询不查的字段一定不要查
在多表联查的时候,这时用的是左外联(即如果右边的没有就查出左边的表) 如果右边的没有,那么在Navicat中查询出如下图 而在mybatis中运用同样的查询语句时,查询出来字段的也是这样 这时如果左表 ...
- 03_java基础(八)之static关键字与代码块
20\21.static关键字 /** * static关键字 * 1.用static修饰后的方法,称为静态方法. * 2.静态的方法特点,可以使用 类名.方法名称 调用方法 * 3.静态方法只能调用 ...
- VmWare15 许可证
UG5J2-0ME12-M89WY-NPWXX-WQH88
- Java获得数据库查询结果的列数和行数,打印查询结果
Java连接数据库及简单操作见我以前的一篇随笔:http://www.cnblogs.com/meitian/p/5036332.html 一.获取查询结果的行数和列数 查询结果为ResultSe ...
- thymeleaf 在js中获取message信息或获取后台属性
<script th:inline="javascript"> /*<![CDATA[*/ [[#{message1}]] [[${abc}]] /*]]> ...
- JS 7路线图
JS 7路线图 今天,我很高兴宣布路线图到视频.JS 7!虽然这是一个主要版本更新,但很少有真正打破.两个主要变化是添加了videojs-http-streaming,简称为VHS,以及删除了对较老版 ...
- 简单的jQ代码
简单的jQ代码 /* * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2012 Mika Tuup ...