zoukankan      html  css  js  c++  java
  • 第四周Android练习

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
        <Button
            android:id="@+id/squral1"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#2283f3"
            android:layout_centerInParent="true" />
    
        <Button
            android:id="@+id/squral2"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#0839FC"
            android:layout_toRightOf="@id/squral1"
            android:layout_centerInParent="true" />
    
        <Button
            android:id="@+id/squral3"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#0FDEE8"
            android:layout_toLeftOf="@id/squral1"
            android:layout_centerInParent="true" />
    
        <Button
            android:id="@+id/squral4"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#000000"
            android:layout_above="@id/squral1"
            android:layout_alignLeft="@id/squral1" />
    
        <Button
            android:id="@+id/squral5"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_above="@id/squral3"
            android:layout_alignLeft="@id/squral3"
            android:layout_centerInParent="true"
            android:layout_marginLeft="-1dp"
            android:layout_marginBottom="0dp"
            android:background="#767C74" />
    
        <Button
            android:id="@+id/squral6"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#B476ED"
            android:layout_alignBottom="@id/squral4"
            android:layout_toRightOf="@id/squral4"
            />
    
        <Button
            android:id="@+id/squral7"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#EAFA03"
            android:layout_toLeftOf="@id/squral1"
            android:layout_below="@id/squral3"
            />
    
        <Button
            android:id="@+id/squral8"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#FA3603"
            android:layout_below="@id/squral1"
            android:layout_toRightOf="@id/squral7"
             />
    
        <Button
            android:id="@+id/squral9"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#03FC50"
            android:layout_below="@id/squral1"
            android:layout_toRightOf="@id/squral8"
            />
    
    </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"
        android:background="@drawable/background1">
    
        <ImageView
            android:layout_width="150dp"
            android:layout_height="150dp"
            android:layout_marginTop="100dp"
            android:src="@drawable/touxiang"
            android:layout_centerHorizontal="true"/>
    
        <TextView
            android:layout_width="325dp"
            android:layout_height="wrap_content"
            android:text="   用户名"
            android:textSize="25dp"
            android:background="#FFFFFF"
            android:layout_marginTop="300dp"
            android:layout_centerHorizontal="true"/>
    
        <EditText
            android:layout_width="325dp"
            android:layout_height="wrap_content"
            android:text="   密码"
            android:textSize="25dp"
            android:background="#FFFFFF"
            android:layout_marginTop="350dp"
            android:layout_centerHorizontal="true"/>
    
        <Button
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:text="登录"
            android:textSize="25dp"
            android:layout_marginTop="400dp"
            android:layout_centerHorizontal="true"
            android:background="#2283f3"
            android:textColor="#ffffff"
    
        />
    
    </RelativeLayout>

  • 相关阅读:
    HttpWebRequest中的ContentType详解
    c# 创建Windows服务
    转载 Url编码
    在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。
    IE兼容模式下 SCRIPT1028: 缺少标识符、字符串或数字
    Response.ContentLength获取文件大小
    unable to instantiate activity...
    查看android-support-v4.jar引出的问题
    导入项目 R.java没有
    初识python: 局部变量、全局变量
  • 原文地址:https://www.cnblogs.com/Hackman/p/13697778.html
Copyright © 2011-2022 走看看