码迷,mamicode.com
首页 > 其他好文 > 详细

08 RelativeLayout 布局

时间:2014-04-29 23:42:35      阅读:532      评论:0      收藏:0      [点我收藏+]

标签:android   com   http   blog   style   class   div   img   code   java   javascript   

mamicode.com,码迷

 

mamicode.com,码迷
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#0000FF"
    android:padding="10px"
    >
    <TextView  
        android:id="@+id/tv01"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_marginBottom="30dp"
        android:text="Type here:"
        />
    <EditText
        android:id="@+id/txt01"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/tv01"
        />
    <Button
        android:id="@+id/btn01"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_below="@id/txt01"
        android:layout_alignParentRight="true"
        android:text="OK"
        />
    <Button
        android:id="@+id/btn02"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_below="@id/txt01"
        android:layout_toLeftOf="@id/btn01"
        android:layout_marginRight="30dp"
        android:text="Cancel"
        />
</RelativeLayout>
mamicode.com,码迷

 

08 RelativeLayout 布局,码迷,mamicode.com

08 RelativeLayout 布局

标签:android   com   http   blog   style   class   div   img   code   java   javascript   

原文地址:http://www.cnblogs.com/cliffhuang/p/3696878.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!