一个登陆注册页面

//登陆

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.bwie.test.monidierzhou.MainActivity">
    <TextView
        android:text="登录"
        android:textSize="18sp"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="50dp" />
    <TextView
        android:background="#f1ebeb"
        android:layout_width="match_parent"
        android:layout_height="5dp" />
    <EditText
        android:id="@+id/login_umobile"
        android:hint="请输入手机号"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="50dp"
        android:layout_marginBottom="30dp"/>
    <EditText
        android:id="@+id/login_upwd"
        android:hint="请输入密码"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="30dp"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:padding="30dp">
        <Button
            android:layout_weight="1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="登录"
            android:onClick="login"/>
        <Button
            android:layout_weight="1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="注册"
            android:onClick="regist"/>
    </LinearLayout>

</LinearLayout>
//注册

<?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">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="60dp">
        <TextView
            android:id="@+id/fan"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text=""
            android:textSize="35dp"/>
        <TextView
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:text="注册"
            android:textSize="20dp"
            android:gravity="center"/>
    </RelativeLayout>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="5dp"
        android:background="#f1ebeb"/>
    <EditText
        android:id="@+id/reg_umobile"
        android:hint="请输入手机号"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="50dp"
        android:layout_marginBottom="30dp"/>
    <EditText
        android:id="@+id/reg_upwd"
        android:hint="请输入密码"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="30dp"/>
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="立即注册"
        android:textSize="25dp"
        android:textColor="#89f"
        android:onClick="goRegist"
        android:layout_gravity="center"/>

</LinearLayout>

//搜索页面

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:padding="10dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="搜索商品"
            android:textSize="35dp"
            android:layout_centerInParent="true"/>
        <CheckBox
            android:button="@null"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:id="@+id/ck"
            android:background="@drawable/myselect"
            android:layout_alignParentRight="true"/>
    </RelativeLayout>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="3dp"
        android:background="#f1ebeb"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:padding="10dp">
        <EditText
            android:id="@+id/shu"
            android:layout_width="220dp"
            android:layout_height="wrap_content"
            android:hint="请输入关键字"
            android:layout_marginLeft="50dp"/>
        <Button
            android:onClick="search"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="搜索"
            android:layout_alignRight="@+id/shu"/>
    </LinearLayout>
    <TextView
        android:background="#f1ebeb"
        android:layout_width="match_parent"
        android:layout_height="3dp" />
    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    </android.support.v7.widget.RecyclerView>

</LinearLayout>

//grid.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="20dp">
    <ImageView
        android:id="@+id/img"
        android:layout_width="180dp"
        android:layout_height="180dp"
        android:src="@mipmap/ic_launcher"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:text="ddddddddd"/>
        <TextView
            android:id="@+id/price"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:text="aaaaa"/>
    </LinearLayout>

</LinearLayout>

//list.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="15dp">
    <ImageView
        android:id="@+id/img"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:src="@mipmap/ic_launcher"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:text="ddddddddd"/>
        <TextView
            android:id="@+id/price"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:text="aaaaa"/>
    </LinearLayout>

</LinearLayout>

添加的权限

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.squareup.okio:okio:1.11.0'
compile 'com.orhanobut:logger:2.1.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'



  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值