今天对图片进行了一些分析每张图片运用的布局都基本掌握:
今天先做登录界面。每天po出一张界面的代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/foot"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/background_login">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="登录"
android:textColor="#ffffff"
android:textSize="16sp" />
<TextView
android:onClick="DoClickzhuce"
android:id="@+id/loginzhuce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:text="注册"
android:textColor="#ffffff"
android:textSize="10sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:src="@drawable/picturela" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="10">
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="8"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="59dp">
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="25dp"
android:text="手机号"
android:textSize="15sp"
android:textStyle="bold" />
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:digits="1234567890"
android:maxLength="11"
android:paddingLeft="5dp"
android:paddingTop="25dp"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#e9e1e1">
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="10">
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="8"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="59dp">
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="25dp"
android:text="登录密码"
android:textSize="15sp"
android:textStyle="bold" />
<EditText
android:id="@+id/aa"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:paddingLeft="5dp"
android:paddingTop="25dp"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#e9e1e1">
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="30dp">
<TextView
android:onClick="DoClickwangjimima"
android:id="@+id/loginwangjimima"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="40dp"
android:text="忘记密码"
android:textColor="#0f52e2" />
</RelativeLayout>
<Button
android:onClick="DoClickloginlogin"
android:id="@+id/loginlogin"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:layout_marginTop="30dp"
android:background="@drawable/shape_yuanjiaokuanger"
android:text="登录"
android:textColor="#ffffff"
android:textSize="15sp" />
</LinearLayout>
</ScrollView>
</LinearLayout>