<?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 框架的设计理念与设计模式分析

    转载地址:https://www.ibm.com/developerworks/cn/java/j-lo-spring-principle/ Spring 作为现在最优秀的框架之一,已被广泛的使用,并 ...

  2. wireshark使用教程

    Wireshark: https://www.wireshark.org/ 安装: apt-get install wireshark 教程: http://blog.csdn.net/leichel ...

  3. 【Todo】【读书笔记】大数据Spark企业级实战版 & Scala学习

    下了这本<大数据Spark企业级实战版>, 另外还有一本<Spark大数据处理:技术.应用与性能优化(全)> 先看前一篇. 根据书里的前言里面,对于阅读顺序的建议.先看最后的S ...

  4. Activity中与ListActivity中使用listview区别

    Activity中与ListActivity中使用listview区别 一.Activity中与ListActivity中使用listview区别(本身没多大区别,只是ListActivity在lis ...

  5. OpenGL的glTranslatef平移变换函数详解

    OpenGL的glTranslatef平移变换函数详解 glTranslated()和glTranslatef()这两个函数是定义一个平移矩阵,该矩阵与当前矩阵相乘,使后续的图形进行平移变换. 我们先 ...

  6. C#_DataTable导出Execl为自定义标题

    public bool ExportExcel(DataTable tb, string path, string tbName) { //excel 2003格式 string connString ...

  7. Difference between Hard Clip(H) and Soft Clip(S) in Samtools CIGAR string

    一般人都知道 H 和 S 的表面上的区别,即 S 就是 soft, H 就是 hard,S 后,序列里还是会保留序列的信息,而 H 则不会. ----------------------------- ...

  8. shell脚本基础知识

    虽然现在能在Linux系统下生存,但是自觉效率太低,和高手有很大的差距. 这就是关于Linux的知识太过匮乏,有很多事情知道该怎么做,但是就是没法在Linux下实现,为了提升工作效率,必须要接触Lin ...

  9. eclipse 删除 tomcat8 重新添加的问题

    今天手贱,把Eclipse里的tomcat删掉了,然后发现后面就不能重建了,很蛋疼啊...而且今天也发现eclipse里的tomcat启动时会把本地原来conf目录下的配置比如:tomcat-user ...

  10. Java substring() 方法

    Java String类 substring() 方法返回字符串的子字符串. 语法 public String substring(int beginIndex) 或 public String su ...