zoukankan      html  css  js  c++  java
  • 相对布局relativeLayout

    相对布局relativeLayout

    一、简介

    二、实例

    代码

    /Test_FrameLayout/res/layout/relativelayout.xml

    android:layout_centerHorizontal="true"
    android:layout_toRightOf="@+id/qq_icon"
    android:layout_marginTop="13dp"


     1 <?xml version="1.0" encoding="utf-8"?>
     2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:layout_width="match_parent"
     4     android:layout_height="match_parent" >
     5     
     6     <ImageView 
     7         android:id="@+id/qq_icon"
     8         android:layout_width="100dp"
     9         android:layout_height="100dp"
    10         android:src="@drawable/QQ"
    11         />
    12     
    13     <EditText 
    14         android:id="@+id/et_accout"
    15         android:layout_width="160dp"
    16         android:layout_height="wrap_content"
    17         android:text="请输入账号"
    18         android:layout_toRightOf="@+id/qq_icon"
    19         />
    20     
    21     <EditText 
    22         android:id="@+id/et_password"
    23         android:layout_width="160dp"
    24         android:layout_height="wrap_content"
    25         android:text="请输入密码"
    26         android:layout_toRightOf="@+id/qq_icon"
    27         android:layout_below="@+id/et_accout"
    28         />
    29     
    30     <TextView 
    31         android:id="@+id/tv_register"
    32         android:layout_width="fill_parent"
    33         android:layout_height="wrap_content"
    34         android:text="注册账号"
    35         android:layout_toRightOf="@+id/et_accout"
    36         android:layout_marginTop="13dp"
    37         />
    38     
    39     <TextView 
    40         android:id="@+id/tv_findPassword"
    41         android:layout_width="fill_parent"
    42         android:layout_height="wrap_content"
    43         android:text="找回密码"
    44         android:layout_toRightOf="@+id/et_accout"
    45         android:layout_marginTop="48dp"
    46         />
    47     
    48     <CheckBox
    49         android:id="@+id/cb_rememberPassword"
    50         android:layout_width="100dp"
    51         android:layout_height="wrap_content"
    52         android:layout_below="@id/et_password"
    53         android:layout_toRightOf="@id/qq_icon"
    54         android:text="记住密码"
    55         android:textSize="13sp"
    56         ></CheckBox>
    57     
    58     <CheckBox
    59         android:id="@+id/cb_autoLogin"
    60         android:layout_width="100dp"
    61         android:layout_height="wrap_content"
    62         android:layout_below="@id/et_password"
    63         android:layout_toRightOf="@id/cb_rememberPassword"
    64         android:text="自动登录"
    65         android:textSize="13sp"
    66         ></CheckBox>
    67     
    68     <Button
    69         android:id="@+id/btn_login"
    70         android:layout_width="170dp"
    71         android:layout_height="wrap_content"
    72         android:text="登录"
    73         android:layout_below="@id/cb_rememberPassword"
    74         android:layout_centerHorizontal="true"
    75         ></Button>
    76 </RelativeLayout>
  • 相关阅读:
    生活小记--工作一年后的菜鸡
    git使用笔记-git项目的建立及配置、创建子分支及独立分支、分支重命名
    React-leaflet在ant-design pro中的基本使用
    ionic新入坑-环境搭建+新建项目+打开低版本项目处理
    canvas绘制圆心扇形可组成颜色随机的七色小花
    取所选当前时间前十二个月的数据
    win10被微软流氓更新后编译基于visual Studio的web项目报[ArgumentOutOfRangeException: 指定的参数已超出有效值的范围
    浅析__proto__、prototype
    JavaScript数据类型
    异步与多线程实现不阻塞区别
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/7279026.html
Copyright © 2011-2022 走看看