zoukankan      html  css  js  c++  java
  • RelativeLayout 相对父级元素布局

    相对布局,用来设置相对父级视图的位置

    <RelativeLayout
           xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:padding="16dp">
    
       <TextView
            android:text="I’m in this corner"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true" />
    
        <TextView
            android:text="No, up here"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true" />
    
        <TextView
            android:text="Wait, I’m here"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true" />
    
        <TextView
            android:text="Actually, I’m here"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentRight="true" />
    
    </RelativeLayout>
  • 相关阅读:
    CentOS中rpm和yum到底有什么区别?
    Anaconda是个什么东东?
    Hadoop入门学习整理(三)
    Hadoop入门学习整理(二)
    CentOS6.10下安装MongoDB和Redis
    Linux 系统中环境变量/etc/profile、/etc/bashrc、~/.bashrc的区别
    一些想法
    时间
    周末
    条件
  • 原文地址:https://www.cnblogs.com/superxuezhazha/p/9401615.html
Copyright © 2011-2022 走看看