一:主页面布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<FrameLayout
android:id="@+id/frament"
android:layout_weight="9"
android:layout_width="match_parent"
android:layout_height="0dp">
</FrameLayout>
<RadioGroup
android:id="@+id/radio"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
>
<RadioButton
android:button="@null"
android:text="首页"
android:id="@+id/homepage"
android:gravity="center"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent" />
<RadioButton
android:button="@null"
android:text="我的"
android:id="@+id/me"
android:gravity="center"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent" />
</RadioGroup>
</LinearLayout>
二:fragment_home布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:background="#ED1C24"
android:layout_width="match_parent"
android:layout_height="40dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:layout_marginBottom="13dp"
android:text="首页" />
<TextView
android:id="@+id/code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="13dp"
android:layout_marginRight="2dp"
android:text="扫一扫"
android:layout_alignParentRight="true" />
</RelativeLayout>
<android.support.v4.view.ViewPager
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="200dp">
</android.support.v4.view.ViewPager>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:background="@drawable/backgroup"
android:id="@+id/code_edit"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignTop="@+id/code_button"
android:layout_alignParentLeft="true" />
<Button
android:id="@+id/code_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="33dp"
android:text="生成"
android:layout_alignParentRight="true" />
<ImageView
android:id="@+id/code_img"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="98dp" />
</RelativeLayout>
</LinearLayout>
三:fragment_me布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:background="#ED1C24"
android:layout_width="match_parent"
android:layout_height="40dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:layout_marginBottom="13dp"
android:text="我的" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="#ED1C24">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_above="@+id/login"
android:layout_centerHorizontal="true"
android:src="@mipmap/ic_launcher" />
<Button
android:id="@+id/me_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="109dp"
android:text="登录" />
</RelativeLayout>
</LinearLayout>
四:登录布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<EditText
android:hint="请输入手机号"
android:id="@+id/login_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:hint="请输入密码"
android:id="@+id/login_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:layout_gravity="center"
android:id="@+id/login_loginbut"
android:text="登录"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/login_reg"
android:textColor="#0064EB"
android:layout_marginTop="50dp"
android:layout_marginLeft="400dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册" />
</LinearLayout>
五:注册布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="@+id/reg_text"
android:hint="请输入手机号"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/reg_password"
android:hint="请输入密码"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:text="注册"
android:id="@+id/reg_but"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>