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 ...
随机推荐
- ionic框架
ionic 是目前最有潜力的一款 HTML5 手机应用开发框架.通过 SASS 构建应用程序,它提供了很多 UI 组件来帮助开发者开发强大的应用. 它使用 JavaScript MVVM 框架和 An ...
- Unity3D架构设计NavMesh寻路
Unity3D架构设计NavMesh寻路 发表于2013年10月6日由陆泽西 国庆闲来没事把NavMesh巩固一下.以Unity3D引擎为例写一个底层c# NavMesh寻路.因为Unity3D中本身 ...
- win10 时间很烦
1.刷2次策略.2.打开控制面板-管理工具-服务里,有个windows time的服务,应该是正在运行,手动(触发),右键停止.3.win+r,regedit,打开注册表,找到HKEY_LOCAL_M ...
- centos下send-mail出错
当在脚本中执行发邮件操作得时候出现以下错误:send-mail: fatal: parameter inet_interfaces: no local interface found for ::1 ...
- 1.5.2、CDH 搭建Hadoop在安装之前(定制安装解决方案---使用内部包存储库)
本主题描述如何在Cloudera Manager部署中创建内部包存储库和直接主机以使用该存储库.您可以创建永久或临时存储库. 完成这些步骤后,您可以安装特定版本的Cloudera Manager或在未 ...
- cacti有图无数据解决办法
Cacti 安装不久,图像界面出来了,但是一直没有数据. Cacti 日志中的错误或警告也都一个个全部解决.有些需要访问文件的权限也都有了. 1.system utilities –>Rebui ...
- Linux常用软件整理
视频:VLC 音乐:网易云 编辑器:Vim,Vscode 截图:Shutter 远程桌面:Remmina 笔记:NixNote(evernote第三方版本) 屏幕亮度调节:Brightness Con ...
- 【Scheme】符号求导
思路: 定义一个求导算法, 令其在抽象对象上执行求导操作. 可以由以下规约规则完成: dc/dx=0 dx/dx=1 d(u+v)/dx=du/dx+dv/dx d(uv)/dx=u(dv/dx)+v ...
- LibreOJ 6277. 数列分块入门 2
题目链接:https://loj.ac/problem/6278 参考博客:https://blog.csdn.net/qq_36038511/article/details/79725027 这题我 ...
- open suse linux 磁盘分区
在opensuse 中我是这样对磁盘进行配置的 先添加一块磁盘任意大小 reboot 重启 ls /dev/ | grep sd 可以看到有一块sdb 的磁盘没有分区 fdisk /dev/sdb n ...