新版本 #12

Merged
px8tqwyol merged 1 commits from wangze_part into master 2 months ago

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/white" />
<solid android:color="#FFFFFF" />
<stroke android:width="1dp" android:color="#E0E0E0" />
<corners android:radius="8dp" />
<stroke
android:width="1dp"
android:color="#e0e0e0" />
</shape>

@ -5,43 +5,30 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Fragment 容器 -->
<FrameLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/mainTabBar"/>
<!-- 底部导航栏 -->
<com.startsmake.mainnavigatetabbar.widget.MainNavigateTabBar
android:id="@+id/mainTabBar"
android:layout_width="match_parent"
android:layout_height="50.0dip"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
android:background="@android:color/white"
app:containerId="@+id/main_container"
app:navigateTabSelectedTextColor="@color/comui_tab_text_color"
app:navigateTabTextColor="@color/comui_tab_text_color"/>
app:navigateTabSelectedTextColor="#FFD700"
app:navigateTabTextColor="#666666"/>
<!-- 顶部阴影(可选) -->
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="3dp"
android:layout_above="@+id/mainTabBar"
android:background="@mipmap/comui_bar_top_shadow"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="76.0dip"
android:layout_alignParentBottom="true"
android:background="@android:color/transparent"
android:gravity="center|top"
android:orientation="vertical">
android:src="@mipmap/comui_bar_top_shadow"
android:scaleType="fitXY"/>
<ImageView
android:id="@+id/tab_post_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onClickPublish"
android:src="@mipmap/comui_tab_post"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

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

@ -565,9 +565,9 @@
android:layout_height="16dp"
android:src="@drawable/ic_arrow_right" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -576,48 +576,48 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp">
<LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#eeeeee" />
<LinearLayout
android:id="@+id/ll_logout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:gravity="center_vertical"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_logout"
android:layout_marginEnd="12dp"
android:color="#FF5722" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="退出登录"
android:textSize="14sp"
android:textColor="#FF5722" />
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_arrow_right"
android:color="#FF5722" />
</LinearLayout>
android:layout_height="1dp"
android:background="#eeeeee" />
<LinearLayout
android:id="@+id/ll_logout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:gravity="center_vertical"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_logout"
android:layout_marginEnd="12dp"
android:color="#FF5722" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="退出登录"
android:textSize="14sp"
android:textColor="#FF5722" />
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_arrow_right"
android:color="#FF5722" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -19,5 +19,9 @@
<color name="gray">#FF9E9E9E</color>
<color name="green">#FF4CAF50</color>
<color name="logout_red">#FF5722</color>
<color name="primary_blue">#007BFF</color>
<color name="primary_blue_dark">#1976D2</color>
<color name="primary_blue_light">#64B5F6</color>
<color name="gray_300">#E0E0E0</color>
<color name="comui_tab_text_color">#ff333333</color>
</resources>

Loading…
Cancel
Save