Android UI---仿照QQ登录界面

Android studio版本 3.2.0

MainActivity.,java文件为:

package com.example.android_qq_copy;

import android.support.v7.app.AppCompatActivity;

import android.os.Bundle;

public class MainActivityextends AppCompatActivity {

@Override

    protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

}

}




  activity_main.xml文件为:

<?xml version="1.0" encoding="utf-8"?>

    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">

        android:layout_width="match_parent"

        android:layout_marginTop="50dp"

        android:orientation="vertical"

        android:layout_height="wrap_content">

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:drawableLeft="@mipmap/ic_launcher"

            android:text="QQ"

            android:textSize="40sp"/>

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:layout_marginTop="30dp"

            android:text="QQ号码/手机号/邮箱"/>

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:text="密码"/>

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:text="登录"

            android:textSize="20sp"/>

            android:layout_marginTop="10dp"

            android:layout_width="match_parent"

            android:layout_height="wrap_content">

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="忘记密码"

                android:textColor="#00aaff"

                android:textSize="16dp"/>

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="新用户注册"

                android:layout_alignParentRight="true"

                android:textColor="#00aaff"

                android:textSize="16dp"/>

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="登录即代表阅读并同意阅读条款"

        android:layout_centerHorizontal="true"

        android:layout_alignParentBottom="true"

        android:layout_marginBottom="50dp"

        android:textColor="#00aaff"

        android:textSize="20dp"/>

详细代码见:https://github.com/PYScourse/Copy_QQ_Login

 

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容