Android EditText(失焦+焦点)+登录界面

32 阅读1分钟

<ScrollView xmlns:android="schemas.android.com/apk/res/and…"

android:id="@+id/rl_login_root"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@drawable/hh2">

<LinearLayout

android:id="@+id/ll_content"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_gravity="center"

android:gravity="center">

<LinearLayout

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="vertical">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginBottom="50dp"

android:gravity="center">

<ImageView

android:layout_width="100dp"

android:layout_height="100dp"

android:src="@drawable/splash" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal">

<ImageView

android:id="@+id/iv_profile"

android:layout_width="20dp"

android:layout_height="20dp"

android:layout_marginTop="28dp"

android:src="@drawable/white_profile" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="5dp"

android:layout_marginTop="20dp"

android:orientation="vertical">

<EditText

android:id="@+id/et_user_name"

android:layout_width="250dp"

android:layout_height="wrap_content"

android:layout_margin="5dp"

android:background="@null"

android:hint="@string/user_hint"

android:textColor="#b2000000"

android:textColorHint="#FFFFFF"

android:textCursorDrawable="@null"

android:textSize="15dp" />

<View

android:id="@+id/view_login_username"

android:layout_width="260dp"

android:layout_height="0.5dp"

android:background="@drawable/shape" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal">

<ImageView

android:id="@+id/iv_lock"

android:layout_width="20dp"

android:layout_height="20dp"

android:layout_marginTop="28dp"

android:src="@drawable/white_lock" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="5dp"

android:layout_marginTop="20dp"

android:orientation="vertical">

<EditText

android:id="@+id/et_password"

android:layout_width="250dp"

android:layout_height="wrap_content"

android:layout_centerHorizontal="true"

android:layout_margin="5dp"

android:background="@null"

android:hint="@string/please_enter_a_password"

android:textColor="#b2000000"

android:textColorHint="#FFFFFF"

android:textCursorDrawable="@null"

android:textSize="15dp" />

<View

android:id="@+id/view_login_password"

android:layout_width="260dp"