调整滚动布局

This commit is contained in:
renhaoting 2025-11-24 16:09:08 +08:00
parent 1ddecca515
commit 64078445df
1 changed files with 265 additions and 262 deletions

View File

@ -1,263 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff6efff">
<FrameLayout
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_height="wrap_content"
android:paddingHorizontal="-15dp"
android:scaleType="centerCrop"
android:src="@mipmap/benefit_bg_top"
/>
<LinearLayout
android:id="@+id/content_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.ama.core.architecture.widget.CustomTitleBar
android:id="@+id/titlebar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="-15dp"
android:scaleType="centerCrop"
android:src="@mipmap/benefit_bg_top"
/>
<LinearLayout
android:id="@+id/content_root"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.ama.core.architecture.widget.CustomTitleBar
android:id="@+id/titlebar"
android:layout_width="match_parent"
android:layout_marginTop="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:gravity="center_vertical"
>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:gravity="center_vertical"
>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_top_left"
/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/gray_c9"
android:text="@string/termina"
android:layout_marginHorizontal="20dp"
/>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_top_right"
/>
</LinearLayout>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/bg_benefit_top_white"
android:padding="15dp"
android:orientation="vertical"
android:layout_marginHorizontal="15dp">
android:src="@mipmap/benefit_top_left"
/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/gray_c9"
android:text="@string/termina"
android:layout_marginHorizontal="20dp"
/>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_marginTop="20dp"
android:src="@drawable/bg_benefit_top_items"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_marginTop="-40dp"
android:gravity="center_vertical" >
<!--items-1-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_expired"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_expired_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_gravity="center_horizontal|bottom"
android:textSize="12sp"
android:textColor="@color/white"
android:text="@string/cash01"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/gray_60"
android:text="@string/expired"/>
</LinearLayout>
<!--items-1-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_ongoing"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/tv_ongoing_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="3dp"
android:src="@mipmap/icon_check_mark"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/green_39"
android:text="@string/onging"/>
</LinearLayout>
<!--items-3-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_waitting"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_waiting_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_gravity="center_horizontal|bottom"
android:textSize="12sp"
android:textColor="@color/white"
android:text="@string/cash01"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/red_5c"
android:text="@string/waitting"/>
</LinearLayout>
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:textSize="18sp"
android:textStyle="bold"
android:background="@mipmap/but_bg_grady"
android:gravity="center"
android:layout_gravity="bottom|center_horizontal"
android:textColor="@color/white"
android:text="@string/resgatar"/>
android:src="@mipmap/benefit_top_right"
/>
</LinearLayout>
</FrameLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/bg_benefit_top_white"
android:padding="15dp"
android:orientation="vertical"
android:layout_marginHorizontal="15dp">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="15dp"
android:paddingHorizontal="5dp"
android:textSize="15sp"
android:background="@drawable/bg_benefit_tasks_top"
android:gravity="center"
android:layout_gravity="bottom|center_horizontal"
android:textColor="@color/black_33"
android:text="@string/benefit_task_top_hint"/>
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
android:layout_marginTop="20dp"
android:background="@drawable/bg_benefit_top_white"
android:padding="15dp"
android:orientation="vertical"
android:layout_marginHorizontal="15dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_marginTop="20dp"
android:src="@drawable/bg_benefit_top_items"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_marginTop="-40dp"
android:gravity="center_vertical" >
<!--items-1-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_expired"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_expired_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_gravity="center_horizontal|bottom"
android:textSize="12sp"
android:textColor="@color/white"
android:text="@string/cash01"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/gray_60"
android:text="@string/expired"/>
</LinearLayout>
<!--items-1-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_ongoing"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/tv_ongoing_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="3dp"
android:src="@mipmap/icon_check_mark"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/green_39"
android:text="@string/onging"/>
</LinearLayout>
<!--items-3-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_horizontal" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/benefit_item_waitting"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_waiting_cash_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_gravity="center_horizontal|bottom"
android:textSize="12sp"
android:textColor="@color/white"
android:text="@string/cash01"/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="12sp"
android:textColor="@color/red_5c"
android:text="@string/waitting"/>
</LinearLayout>
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/gray6"
android:text="@string/progress"/>
<com.ama.core.architecture.widget.CustomProgressBar
android:id="@+id/progress_tasks"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="5dp"
android:layout_marginHorizontal="10dp"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_progress_num"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:textSize="12sp"
android:layout_marginTop="25dp"
android:textSize="18sp"
android:textStyle="bold"
android:background="@mipmap/but_bg_grady"
android:gravity="center"
android:textColor="@color/gray9"
android:text="(0%)"/>
android:layout_gravity="bottom|center_horizontal"
android:textColor="@color/white"
android:text="@string/resgatar"/>
</LinearLayout>
@ -266,53 +213,109 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_1"
android:background="@drawable/bg_benefit_top_white"
android:padding="15dp"
android:orientation="vertical"
android:layout_marginHorizontal="15dp">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
android:paddingVertical="15dp"
android:paddingHorizontal="5dp"
android:textSize="15sp"
android:background="@drawable/bg_benefit_tasks_top"
android:gravity="center"
android:layout_gravity="bottom|center_horizontal"
android:textColor="@color/black_33"
android:text="@string/benefit_task_top_hint"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_2"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_3"
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/gray6"
android:text="@string/progress"/>
<com.ama.core.architecture.widget.CustomProgressBar
android:id="@+id/progress_tasks"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="5dp"
android:layout_marginHorizontal="10dp"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_progress_num"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:textSize="12sp"
android:gravity="center"
android:textColor="@color/gray9"
android:text="(0%)"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
android:layout_marginTop="20dp"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_f2"
/>
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView
android:id="@+id/task_item_3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout>