登录的简单使用

一:主页面布局

<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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值