首页 > 代码库 > 硅谷社交3--登录页面

硅谷社交3--登录页面

技术分享

1.页面布局

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical">

    <com.hyphenate.easeui.widget.EaseTitleBar
        app:titleBarTitle="登录"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    </com.hyphenate.easeui.widget.EaseTitleBar>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="150dp">

        <TextView
            android:text="硅谷社交"
            android:textSize="30dp"
            android:gravity="center"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </LinearLayout>

    <LinearLayout
        android:layout_margin="10dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:text="用户名:"
            android:textSize="25sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <EditText
            android:id="@+id/et_login_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:layout_margin="10dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:text="密    码:"
            android:textSize="25sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <EditText
            android:password="true"
            android:id="@+id/et_login_pwd"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>
    
    <LinearLayout
        android:layout_margin="10dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <Button
            android:id="@+id/bt_login_regist"
            android:text="注册"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content" />
        <Button
            android:id="@+id/bt_login_login"
            android:text="登录"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content" />
    </LinearLayout>

</LinearLayout>

  

 

硅谷社交3--登录页面