LinearLayout

<?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>

TableLayout

<?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="550dp">
<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>

RelativeLayout

<?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>

Android——excise(用线性布局、表格布局、相对布局做发送邮件界面)的更多相关文章

  1. Android -- UI布局管理,相对布局,线性布局,表格布局,绝对布局,帧布局

    1. 相对布局 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...

  2. Android精通:View与ViewGroup,LinearLayout线性布局,RelativeLayout相对布局,ListView列表组件

    UI的描述 对于Android应用程序中,所有用户界面元素都是由View和ViewGroup对象构建的.View是绘制在屏幕上能与用户进行交互的一个对象.而对于ViewGroup来说,则是一个用于存放 ...

  3. 【Android开发学习笔记之一】5大布局方式详解

    Android中常用的5大布局方式有以下几种: 线性布局(LinearLayout):按照垂直或者水平方向布局的组件. 帧布局(FrameLayout):组件从屏幕左上方布局组件. 表格布局(Tabl ...

  4. Android初级教程理论知识(第二章布局&读写文件)

    常见布局 相对布局 RelativeLayout 组件默认左对齐.顶部对齐 设置组件在指定组件的右边 android:layout_toRightOf="@id/tv1" 设置在指 ...

  5. android开发_ViewGroup(组视图)-- 五大布局

    view组--ViewGroup(组视图) ViewGroup的作用:在view中添加子控件.ViewGroup的5个子类,就是五大布局: (1) LinearLayout  线性布局(常用) (2) ...

  6. 学习android开发之路(一)页面布局

    Android页面布局 1.Android页面布局一共分为6种: LinearLayout(线性布局).RelativeLayout(相对布局).TableLayout(表格布局).FrameLayo ...

  7. Android精通:TableLayout布局,GridLayout网格布局,FrameLayout帧布局,AbsoluteLayout绝对布局,RelativeLayout相对布局

    在Android中提供了几个常用布局: LinearLayout线性布局 RelativeLayout相对布局 FrameLayout帧布局 AbsoluteLayout绝对布局 TableLayou ...

  8. Android布局_布局概述和LinearLayout布局

    一.布局概述: 布局为UI提供了一个可视化的结构,比如对于一个activity或者app widget的UI,你可以用两种方式声明布局: 在XML中声明UI元素 在运行时实例化布局元素(在java代码 ...

  9. 第24讲 UI_布局 之帧布局 表格布局 绝对布局

    第24讲 UI_布局 之帧布局 表格布局 绝对布局 3. FrameLayout(帧布局) 帧布局是从屏幕的左上角(0,0)坐标开始布局,多个组件层叠排序,后一个组件总会将前一个组件所覆盖,除非最后一 ...

随机推荐

  1. (笔试题)质数因子Prime Factor

    题目: Given any positive integer N, you are supposed to find all of its prime factors, and write them ...

  2. ArcGIS Add-In调试无法重新生成

    在调试ArcGIS Add-In时,出现错误:无法注册程序集"……\Projects\ArcGISAddIn\ArcGISAddIn\bin\Debug\ArcGISAddIn.dll&qu ...

  3. android 线程安全

    android ui 不是线程安全的,所以不能在子线程里更新ui,必须到主线程里更新

  4. vim 如何编辑 GB2312 编码的文件?

    vim 如何编辑 GB2312 编码的文件? 彻底搞清楚字符编码: ASCII, ISO_8859, GB2312,UCS, Unicode, U 结合file和iconv命令转换文件的字符编码类型 ...

  5. 首次使用JBoss流程(windows下)

    1.首先应该明白JBoss分为社区版(AS)和企业版(EAP),其中社区版已经改名wildfly(难道是野苍蝇的意思?),企业版对个人开发者免费下载使用, 这里由于公司要求,我用的是jboss-eap ...

  6. oracle导出数据库dmp文件

    导出数据库为dmp文件,按照当前导出时间设置文件名称 @ECHO OFF ECHO 备份 SCOTT 用户的数据…… SET DBUserName=scott SET DBPassword= SET ...

  7. Android 四大组件(Activity、Service、BroadCastReceiver、ContentProvider)

    转载于:http://blog.csdn.net/byxdaz/article/details/9708491 http://blog.csdn.net/q876266464/article/deta ...

  8. mosquitto配置文件详解

    安装完成之后,所有配置文件会被放置于/etc/mosquitto/目录下,其中最重要的就是Mosquitto的配置文件,即mosquitto.conf,以下是详细的配置参数说明. # Config f ...

  9. android 实现代码混淆

    对于使用签名的apk,经常使用的反编译之后还是能查看class文件的代码实现.对于反编译可查看个人的博客点击打开链接 使用代码混淆就能是这样的常规反编译失效.很多其它混淆机制见官网http://dev ...

  10. python 火车票爬取代码

    1.根据搜索词下载百度图片: # -*- coding: utf-8 -*- """根据搜索词下载百度图片""" import re imp ...