<?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:padding="10dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="10dp"
android:id="@+id/et1"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Subject"
android:padding="10dp"
android:layout_below="@id/et1"
android:layout_marginLeft="10dp"
android:id="@+id/et2"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Message"
android:padding="10dp"
android:layout_below="@id/et2"
android:layout_marginLeft="10dp"
android:id="@+id/tv"
/> <Button
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="取消"
android:layout_alignParentRight="true"
android:id="@+id/bt"
/> <Button
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="确定"
android:layout_toLeftOf="@id/bt"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_above="@id/bt"
android:layout_marginLeft="10dp"
android:layout_below="@id/tv"
android:gravity="top"/> </RelativeLayout>

RelativeLayout练习的更多相关文章

  1. java写RelativeLayout 的属性

    有时项目需要动态的调整一下布局,需要改变一些view的位置属性等等. 直接下代码 RelativeLayout.LayoutParams params=new RelativeLayout.Layou ...

  2. Android开发重点难点1:RelativeLayout(相对布局)详解

    前言 啦啦啦~博主又推出了一个新的系列啦~ 之前的Android开发系列主要以完成实验的过程为主,经常会综合许多知识来写,所以难免会有知识点的交杂,给人一种混乱的感觉. 所以博主推出“重点难点”系列, ...

  3. Android开发3:Intent、Bundle的使用和ListView的应用 、RelativeLayout(相对布局)简述(简单通讯录的实现)

    前言 啦啦啦~博主又来骚扰大家啦~大家是不是感觉上次的Android开发博文有点长呢~主要是因为博主也是小白,在做实验的过程中查询了很多很多概念,努力去理解每一个知识点,才完成了最终的实验.还有就是随 ...

  4. RelativeLayout的位置属性总结

    使用"@id/…"时,所写的id必须在上文中已经定义,不能使用在下文定义的id RelativeLayout的子控件属性总结—— 按照控件之间常规的上下左右依次排列:(指定控件ID ...

  5. 关于java.lang.NoSuchMethodError: android.widget.RelativeLayout.setBackground的解决办法

    今天用一个安卓4.0.4版本的手机测试手上的项目,发现logcat弹出这样一个提示“java.lang.NoSuchMethodError: android.widget.RelativeLayout ...

  6. RelativeLayout中实现控件平分屏幕

    <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_con ...

  7. RelativeLayout中的格局,自适应宽度布局

    RelativeLayout中的布局,自适应宽度布局 该图片中为android布局:总布局为 RelativeLayoutAtLeft 为居左 <TextView android:backgro ...

  8. Android的学习第六章(布局二--RelativeLayout)

    今天我们来说一下Android布局中的Relativelayout布局(相对布局) 根据英译过来意思是相对布局,很容易理解,这一样布局使用的是元素与元素之间的微调做到布局的 含义:通过元素与元素之间的 ...

  9. 在代码设置RelativeLayout的属性,比如layout_below

    ( (RelativeLayout.LayoutParams)holder.ivLvDivider.getLayoutParams()).addRule(RelativeLayout.BELOW, R ...

  10. 使用RelativeLayout控制WebView以及Bottom按钮的位置

    使用RelativeLayout控制WebView以及Bottom按钮的位置 (地址) 在Design View中加入控件RelativeLayout, WebView, LinearLayout(H ...

随机推荐

  1. Spring读书笔记-----使用Spring容器(二)

    一.使用ApplicationContext 前面介绍了,我们一般不会使用BeanFactory实例作为Spring容器,而是使用ApplicationContext实例作为容器,它增强了BeanFa ...

  2. [转载] 高效MacBook工作环境配置

    原文: http://www.xialeizhou.com/?p=71 高效MacBook工作环境配置 发表于 2015 年 8 月 1 日 由 xialeizhou 本文记录整个配置过程,供新入手M ...

  3. poj1329Circle Through Three Points(三角形外接圆)

    链接 套模板 不知道有没有x,y=0情况,不过这种情况都按+号输出的. #include <iostream> #include<cstdio> #include<cst ...

  4. java技术知识点

    1   自我介绍 2  做过的项目 (Java 基础) 3  Java的四个基本特性(抽象.封装.继承,多态),对多态的理解(多态的实现方式)以及在项目中那些地方用到多态 Java的四个基本特性 ◦  ...

  5. B树索引

    在SQL Server中,索引是一种增强式的存在,这意味着,即使没有索引,SQL Server仍然可以实现应有的功能.但索引可以在大多数情况下大大提升查询性能高.在OLAP中尤其明显,要完全理解索引的 ...

  6. JAVA 判断一个字符串是不是一个合法的日期格式

    原文:http://www.cnblogs.com/xdp-gacl/p/3548307.html 最近开发公司的项目,一直找不到合适的正则表达式可以判断一个字符串是否可以转成日期,今天发现可以采用S ...

  7. ORACLE CentOS5.6安装

    1 准备 CentOS 5.6企业版 oracle11g fs 安装.安装环境为vmware虚拟机.另外,本安装文档非常简洁,但关键步骤都指出来了,其他的都是默认选择,遇到不知该如何选择的操作或者问题 ...

  8. python把str转换为int

    def str2int(s): def fn(x,y): return x+y def char2num(s): ':9}[s] return reduce(fn,map(char2num,s)) ' ...

  9. android fragment 博客 学习记录

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37992017 上篇博客中已经介绍了Fragment产生原因,以及一些基本的用法和 ...

  10. VC++编译GSL

    目录 第1章 VC++    1 1.1 修改行结束符    1 1.2 修改#include "*.c" 为 #include "*.inl"    2 1. ...