今天需求要做一个所有app都有的登录界面,正好巩固一下我们之前学的基础布局知识。
先来看下效果图
1.布局的xml文件
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#2197db"
>
android:id="@+id/loginbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:src="@drawable/login_pic"/>
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/loginbutton"
android:layout_marginLeft="28dp"
android:layout_marginRight="28dp"
android:background="#fff"
android:orientation="vertical">
android:layout_width="fill_parent"
android:layout_height="44dp"
android:background="#fff"
android:gravity="center_vertical"
android:orientation=&#