activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="bwie.com.zhoukaoer.activity.MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="30dp" android:gravity="center" android:text="登录" android:background="#ffffff" android:textSize="25dp"/> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="输入用户名" android:id="@+id/name"/> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="输入密码" android:id="@+id/password"/> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:onClick="login" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="登入" /> <Button android:onClick="zhuce" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="注册" /> </LinearLayout> </LinearLayout> </RelativeLayout>main2
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="bwie.com.zhoukaoer.activity.Main2Activity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="30dp" android:gravity="center" android:text="注册" android:background="#ffffff" android:textSize="25dp"/> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="输入用户名" android:id="@+id/tname"/> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="输入密码" android:id="@+id/tpassword"/> <Button android:onClick="zhuce2" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="注册" /> </LinearLayout> </RelativeLayout>main3
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="bwie.com.zhoukaoer.activity.Main3Activity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/sname" android:layout_width="0dp" android:singleLine="true" android:layout_height="wrap_content" android:layout_weight="3"/> <Button android:onClick="search" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="搜索"/> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:textColor="#000000" android:text="热搜"/> <bwie.com.zhoukaoer.Liushibuju.liushi android:id="@+id/liushi" android:layout_width="match_parent" android:layout_height="80dp"> </bwie.com.zhoukaoer.Liushibuju.liushi> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="20dp" android:textColor="#000000" android:text="历史搜索"/> <ListView android:layout_width="match_parent" android:layout_height="200dp" android:id="@+id/lv"></ListView> <Button android:onClick="delete" android:text="清除记录" android:id="@+id/btn" android:visibility="gone" android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout>main4
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="bwie.com.zhoukaoer.activity.Main4Activity"> <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="30dp" 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:background="#f1ebeb" android:layout_width="match_parent" android:layout_height="3dp"/> <TextView android:background="#f1ebeb" android:layout_width="match_parent" android:layout_height="3dp"/> <com.jcodecraeer.xrecyclerview.XRecyclerView android:id="@+id/sou_lv" android:layout_width="match_parent" android:layout_height="wrap_content"></com.jcodecraeer.xrecyclerview.XRecyclerView> </LinearLayout>search_grid_layout
<?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"> <ImageView android:id="@+id/lv_img" android:layout_width="100dp" android:layout_height="100dp" android:src="@mipmap/ic_launcher"/> <TextView android:id="@+id/lv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="dsfsdfsdfdsf"/> <TextView android:id="@+id/lv_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="sdfsdfsdf"/> <TextView android:id="@+id/lv_price01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="dfsfsdfsdg" android:textColor="#f00"/> </LinearLayout>search_lv_layout
<?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"> <ImageView android:id="@+id/lv_img" android:layout_width="100dp" android:layout_height="100dp" android:src="@mipmap/ic_launcher"/> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/lv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="dsfsdfsdfdsf"/> <TextView android:id="@+id/lv_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="sdfsdfsdf"/> <TextView android:id="@+id/lv_price01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="dfsfsdfsdg" android:textColor="#f00"/> </LinearLayout> </LinearLayout>