|
|
|
|
@ -1,14 +1,325 @@
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<FrameLayout
|
|
|
|
|
<LinearLayout
|
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="#f5f5f5">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
<!-- 顶部搜索栏 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:background="#FFFFFF"
|
|
|
|
|
android:padding="8dp">
|
|
|
|
|
|
|
|
|
|
<EditText
|
|
|
|
|
android:id="@+id/et_search"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:hint="搜索民航大学闲置物品"
|
|
|
|
|
android:background="@drawable/search_background"
|
|
|
|
|
android:paddingStart="12dp"
|
|
|
|
|
android:paddingEnd="12dp"
|
|
|
|
|
android:singleLine="true"
|
|
|
|
|
android:textSize="14sp"/>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btn_filter"
|
|
|
|
|
android:layout_width="60dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="筛选"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
|
android:background="@color/primary_blue"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 校区选择标签 -->
|
|
|
|
|
<HorizontalScrollView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:background="#FFFFFF"
|
|
|
|
|
android:paddingVertical="4dp">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/tag_container"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/tag_all"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="全部"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:background="@drawable/tag_selected_background"
|
|
|
|
|
android:layout_marginHorizontal="4dp"/>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/tag_south"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="南区"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:background="@drawable/tag_normal_background"
|
|
|
|
|
android:layout_marginHorizontal="4dp"/>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/tag_north"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="北区"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:background="@drawable/tag_normal_background"
|
|
|
|
|
android:layout_marginHorizontal="4dp"/>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/tag_textbook"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="教材专区"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:background="@drawable/tag_normal_background"
|
|
|
|
|
android:layout_marginHorizontal="4dp"/>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/tag_digital"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="数码电子"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:background="@drawable/tag_normal_background"
|
|
|
|
|
android:layout_marginHorizontal="4dp"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
|
|
<!-- 店铺样例 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="#FFFFFF"
|
|
|
|
|
android:layout_margin="8dp"
|
|
|
|
|
android:padding="12dp"
|
|
|
|
|
android:elevation="2dp">
|
|
|
|
|
|
|
|
|
|
<!-- 店铺头部信息 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:gravity="center_vertical">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_store"
|
|
|
|
|
android:background="#e3f2fd"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:layout_marginEnd="12dp"/>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="王泽的店铺"
|
|
|
|
|
android:textSize="16sp"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:textColor="#333333"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="学号:230340187"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:textColor="#666666"
|
|
|
|
|
android:layout_marginTop="2dp"/>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="信用良好"
|
|
|
|
|
android:textSize="10sp"
|
|
|
|
|
android:background="#4caf50"
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
android:paddingHorizontal="8dp"
|
|
|
|
|
android:paddingVertical="2dp"
|
|
|
|
|
android:gravity="center"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 店铺商品预览 -->
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="在售商品:"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:textColor="#333333"
|
|
|
|
|
android:layout_marginTop="12dp"
|
|
|
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:weightSum="3">
|
|
|
|
|
|
|
|
|
|
<!-- 商品1 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="#f8f9fa"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:layout_marginEnd="4dp">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="80dp"
|
|
|
|
|
android:background="#e0e0e0"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/ic_product_placeholder"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="二手教材"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:textColor="#333333"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:layout_marginTop="4dp"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="¥25"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:textColor="#e53935"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:layout_marginTop="2dp"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 商品2 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="#f8f9fa"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:layout_marginHorizontal="4dp">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="80dp"
|
|
|
|
|
android:background="#e0e0e0"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/ic_product_placeholder"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="蓝牙耳机"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:textColor="#333333"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:layout_marginTop="4dp"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="¥120"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:textColor="#e53935"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:layout_marginTop="2dp"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 商品3 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="#f8f9fa"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:layout_marginStart="4dp">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="80dp"
|
|
|
|
|
android:background="#e0e0e0"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/ic_product_placeholder"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="运动水杯"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:textColor="#333333"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:layout_marginTop="4dp"/>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="¥15"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:textColor="#e53935"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:layout_marginTop="2dp"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 查看店铺按钮 -->
|
|
|
|
|
<Button
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="36dp"
|
|
|
|
|
android:text="进入店铺"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:background="#2196f3"
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
android:layout_marginTop="12dp"/>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 商品列表 -->
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/rv_products"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:padding="8dp"/>
|
|
|
|
|
|
|
|
|
|
<!-- 底部发布按钮 -->
|
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
|
|
|
android:id="@+id/fab_publish"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:text="同城"/>
|
|
|
|
|
android:layout_gravity="end|bottom"
|
|
|
|
|
android:layout_margin="16dp"
|
|
|
|
|
android:src="@drawable/ic_add"
|
|
|
|
|
android:contentDescription="发布闲置"/>
|
|
|
|
|
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
</LinearLayout>
|