首页 > 其他 > 详细

RealativeLayout

时间:2020-05-10 16:49:32      阅读:64      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

技术分享图片 技术分享图片

 

 

技术分享图片
<?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:id="@+id/et_relative_msg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:hint="Message">
    </EditText>
    
    <Button android:id="@+id/btn_relative_ok"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="OK"
        android:layout_below="@id/et_relative_msg"
        android:layout_alignRight="@id/et_relative_msg"
        android:layout_marginLeft="10dp"/>
    
     <Button android:id="@+id/btn_relative_cancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Cancel"
        android:layout_alignTop="@id/btn_relative_ok"
        android:layout_toLeftOf="@id/btn_relative_ok"/>

     <Button
         android:id="@+id/button1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerInParent="true"
         android:text="相对父亲居中" />

</RelativeLayout>
View Code

 

RealativeLayout

原文:https://www.cnblogs.com/superxuezhazha/p/12863955.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!