优化
This commit is contained in:
@@ -9,12 +9,10 @@
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
|
||||
<!-- 背景-->
|
||||
<ImageView
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/bg"
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="true" />
|
||||
android:background="#F6F7FB"/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -12,19 +12,21 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 背景-->
|
||||
<ImageView
|
||||
<!-- <ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/bg"
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="true" />
|
||||
android:adjustViewBounds="true" /> -->
|
||||
|
||||
<!-- 头部 + 标签行,放进 AppBarLayout 里 -->
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent">
|
||||
android:background="@drawable/bg_shop_gradient"
|
||||
android:elevation="0dp"
|
||||
android:stateListAnimator="@null">
|
||||
|
||||
<!-- 这一块会跟着滚动,滑出屏幕 -->
|
||||
<LinearLayout
|
||||
@@ -35,14 +37,39 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<!-- 搜索、皮肤栏 -->
|
||||
<!--消费记录,搜索、皮肤栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="end|bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/recordButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="7dp"
|
||||
android:paddingEnd="7dp"
|
||||
android:background="@drawable/shop_record_bg"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/record" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/mine_consumption_record"
|
||||
android:textColor="#02BEAC"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/searchButton"
|
||||
android:layout_width="24dp"
|
||||
@@ -198,21 +225,34 @@
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/tagScroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tagContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical" />
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/shopTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/shop_title"
|
||||
android:textColor="#1B1F1A"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tagContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical" />
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -68,8 +68,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/complete_bg">
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:scrollbars="none"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -84,239 +85,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_15"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_16"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_17"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_19"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suggestion_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="16sp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/btn_keyboard"
|
||||
android:textColor="#FFFFFF"/>
|
||||
</LinearLayout>
|
||||
android:paddingEnd="4dp" />
|
||||
</HorizontalScrollView>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user