<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">1、创建一个新的项目,命名为phonelogin</span>
2、功能的界面设计如下
这界面采用的是线性布局与相对布局相结合
2.1 界面代码activity_main.xml如下
<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"
android:orientation="vertical"
tools:context="com.example.login.MainActivity" >
<EditText
android:id="@+id/et_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入用户名"
/>
<EditText
android:id="@+id/et_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:password="true"
andr