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: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练习的更多相关文章
- java写RelativeLayout 的属性
有时项目需要动态的调整一下布局,需要改变一些view的位置属性等等. 直接下代码 RelativeLayout.LayoutParams params=new RelativeLayout.Layou ...
- Android开发重点难点1:RelativeLayout(相对布局)详解
前言 啦啦啦~博主又推出了一个新的系列啦~ 之前的Android开发系列主要以完成实验的过程为主,经常会综合许多知识来写,所以难免会有知识点的交杂,给人一种混乱的感觉. 所以博主推出“重点难点”系列, ...
- Android开发3:Intent、Bundle的使用和ListView的应用 、RelativeLayout(相对布局)简述(简单通讯录的实现)
前言 啦啦啦~博主又来骚扰大家啦~大家是不是感觉上次的Android开发博文有点长呢~主要是因为博主也是小白,在做实验的过程中查询了很多很多概念,努力去理解每一个知识点,才完成了最终的实验.还有就是随 ...
- RelativeLayout的位置属性总结
使用"@id/…"时,所写的id必须在上文中已经定义,不能使用在下文定义的id RelativeLayout的子控件属性总结—— 按照控件之间常规的上下左右依次排列:(指定控件ID ...
- 关于java.lang.NoSuchMethodError: android.widget.RelativeLayout.setBackground的解决办法
今天用一个安卓4.0.4版本的手机测试手上的项目,发现logcat弹出这样一个提示“java.lang.NoSuchMethodError: android.widget.RelativeLayout ...
- RelativeLayout中实现控件平分屏幕
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_con ...
- RelativeLayout中的格局,自适应宽度布局
RelativeLayout中的布局,自适应宽度布局 该图片中为android布局:总布局为 RelativeLayoutAtLeft 为居左 <TextView android:backgro ...
- Android的学习第六章(布局二--RelativeLayout)
今天我们来说一下Android布局中的Relativelayout布局(相对布局) 根据英译过来意思是相对布局,很容易理解,这一样布局使用的是元素与元素之间的微调做到布局的 含义:通过元素与元素之间的 ...
- 在代码设置RelativeLayout的属性,比如layout_below
( (RelativeLayout.LayoutParams)holder.ivLvDivider.getLayoutParams()).addRule(RelativeLayout.BELOW, R ...
- 使用RelativeLayout控制WebView以及Bottom按钮的位置
使用RelativeLayout控制WebView以及Bottom按钮的位置 (地址) 在Design View中加入控件RelativeLayout, WebView, LinearLayout(H ...
随机推荐
- LotteryDrawing
import java.util.*; public class MyTest{ public static void main(String[] args){ Scanner in = new Sc ...
- css3动画导航实现
代码 <!DOCTYPE html> <!-- saved from url=(0223)file:///C:/Users/user/AppData/Local/Temp/HZ$D. ...
- flexbox弹性伸缩布局
<!doctype html><html lang="en"><head> <meta charset="UTF-8" ...
- iOS开发者帐号流程
http://ask.dcloud.net.cn/article/152 iOS证书(.p12)和描述文件(.mobileprovision)申请 5+App开发 Apple证书 iOS证书 iOS有 ...
- 每一个可以移动的棋子都要移动——Every-SG 游戏
先看一个问题 HDU 3595 GG and MM (Every_SG博弈) 题目有N个游戏同时进行,每个游戏有两堆石子,每次从个数多的堆中取走数量小的数量的整数倍的石子.取最后一次的获胜.并且N个游 ...
- 转!!各种数据库的jdbc驱动下载及连接方式
各种数据库驱动 数据库名称 下载地址 说明 Mysql http://www.mysql.com/products/connector/j/ Shipped. But need to download ...
- js encodeURI方法认识
很早就知道js中encodeURI方法,也很早就用过,但是每次看到它总感觉有些陌生,因为不知道到底是什么原理,和普通的编码到底什么关系, 今天在查看w3c api时又遇到了她,正好有空就多看了几眼,突 ...
- java final
final:(最终的)看不懂时有必要分析内存画图,不同方法的局部变量是相互独立的额不要被所起的名所困扰. 1)每个方法运行时jvm,都会为其开辟一片内存空间.内存空间是属于这个方法的, 同时,方法中的 ...
- Java客户端通过Http发送POST请求上传文件到web服务器
http://www.cnblogs.com/WilliamJiang/archive/2012/04/29/2475883.html 1.朋友的一个需求,让我给他实现,需求是这样的,需要用ASP.n ...
- 清理无用的CSS样式的几个工具(转)
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...