调整滚动布局

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"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#fff6efff"> android:background="#fff6efff">
<FrameLayout <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
<androidx.appcompat.widget.AppCompatImageView 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="-15dp"
android:scaleType="centerCrop"
android:src="@mipmap/benefit_bg_top"
/> />
<FrameLayout
<LinearLayout
android:id="@+id/content_root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:layout_marginTop="20dp">
<com.ama.core.architecture.widget.CustomTitleBar <LinearLayout
android:id="@+id/titlebar" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> android:orientation="horizontal"
android:layout_gravity="center"
<FrameLayout android:gravity="center_vertical"
android:layout_width="match_parent" >
android:layout_height="wrap_content" <androidx.appcompat.widget.AppCompatImageView
android:layout_marginTop="20dp">
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:src="@mipmap/benefit_top_left"
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">
<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 <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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:src="@mipmap/benefit_top_right"
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"/>
</LinearLayout> </LinearLayout>
</FrameLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:orientation="vertical">
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"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_marginTop="20dp"
android:layout_marginTop="10dp" android:background="@drawable/bg_benefit_top_white"
android:gravity="center_vertical"> 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 <androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" android:layout_marginTop="25dp"
android:textColor="@color/gray6" android:textSize="18sp"
android:text="@string/progress"/> android:textStyle="bold"
android:background="@mipmap/but_bg_grady"
<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:gravity="center"
android:textColor="@color/gray9" android:layout_gravity="bottom|center_horizontal"
android:text="(0%)"/> android:textColor="@color/white"
android:text="@string/resgatar"/>
</LinearLayout> </LinearLayout>
@ -266,53 +213,109 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:orientation="vertical"> android:background="@drawable/bg_benefit_top_white"
android:padding="15dp"
<View android:orientation="vertical"
android:layout_width="match_parent" android:layout_marginHorizontal="15dp">
android:layout_height="1dp" <androidx.appcompat.widget.AppCompatTextView
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_width="match_parent"
android:layout_height="wrap_content" 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" <LinearLayout
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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginVertical="20dp" android:orientation="horizontal"
/> android:layout_marginTop="10dp"
android:gravity="center_vertical">
<View <androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="1dp" android:layout_height="wrap_content"
android:background="@color/gray_f2" android:textSize="14sp"
/> android:textColor="@color/gray6"
<com.gamedog.vididin.features.benefit.widget.BenefitTaskItemView android:text="@string/progress"/>
android:id="@+id/task_item_3"
<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_width="match_parent"
android:layout_height="wrap_content" 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> </LinearLayout>
</LinearLayout> </androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout>
</FrameLayout>
</androidx.core.widget.NestedScrollView>