一.最近写好久没有写编辑栏,都忘记了属性了,写下来下次能直接看
二.现在简单的布局
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity"> <android.support.design.widget.TextInputLayout android:id="@+id/et_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="50dp" > <EditText android:id="@+id/et_names" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入账号"/> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:id="@+id/et_paw" android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/et_paws" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入密码"/> </android.support.design.widget.TextInputLayout> </LinearLayout>
三.我们可以直接通过外层的id获取用户账号,密码