Explorar o código

home页面下面列表完善

liukai %!s(int64=2) %!d(string=hai) anos
pai
achega
5419dd8f70
Modificáronse 20 ficheiros con 633 adicións e 12 borrados
  1. 97 5
      cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/HomeFragment.kt
  2. BIN=BIN
      cpt_main/src/main/res/drawable-xxhdpi/chat_new_icon.webp
  3. BIN=BIN
      cpt_main/src/main/res/drawable-xxhdpi/home_part_job_more.webp
  4. BIN=BIN
      cpt_main/src/main/res/drawable-xxhdpi/home_top_more.webp
  5. BIN=BIN
      cpt_main/src/main/res/drawable-xxhdpi/home_top_point.webp
  6. BIN=BIN
      cpt_main/src/main/res/drawable-xxhdpi/home_top_wallet.webp
  7. 248 4
      cpt_main/src/main/res/layout/fragment_home.xml
  8. 52 0
      cpt_main/src/main/res/layout/item_home_job_tips.xml
  9. 101 0
      cpt_main/src/main/res/layout/item_home_part_time_job.xml
  10. 36 0
      cs_baselib/src/main/java/com/guadou/lib_baselib/engine/ImageViewExt.kt
  11. 2 1
      cs_baselib/src/main/java/com/guadou/lib_baselib/transform/RoundCornersTransformation.java
  12. 2 0
      cs_baselib/src/main/res/values/colors.xml
  13. 87 0
      cs_cptServices/src/main/java/com/guadou/cs_cptservices/widget/TopRound5ImageView.java
  14. BIN=BIN
      cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_banner.png
  15. BIN=BIN
      cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_top_round_job.webp
  16. BIN=BIN
      cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_top_round_tips.webp
  17. BIN=BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/home_item_job_bg.webp
  18. BIN=BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/home_item_promotion_bg.webp
  19. 5 1
      cs_cptServices/src/main/res/values/colors.xml
  20. 3 1
      cs_cptServices/src/main/res/values/strings.xml

+ 97 - 5
cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/HomeFragment.kt

@@ -2,9 +2,16 @@ package com.hongyegroup.cpt_main.ui
 
 import android.os.Bundle
 import android.view.View
+import android.widget.ImageView
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLoadingFragment
 import com.guadou.cs_cptservices.interfaces.IFragmentRefresh
 import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.engine.extLoad
+import com.guadou.lib_baselib.engine.toast
+import com.guadou.lib_baselib.ext.bindData
+import com.guadou.lib_baselib.ext.click
+import com.guadou.lib_baselib.ext.horizontal
+import com.guadou.lib_baselib.ext.vertical
 import com.guadou.lib_baselib.utils.CommUtils
 import com.guadou.lib_baselib.view.gloading.GLoadingTitleStatus
 import com.guadou.lib_baselib.view.gloading.Gloading
@@ -39,37 +46,107 @@ class HomeFragment : YYBaseVDBLoadingFragment<HomeViewModel, FragmentHomeBinding
 
     override fun init(savedInstanceState: Bundle?) {
 
-        initRV()
         initData()
         initListener()
     }
 
     private fun initData() {
         showStateLoading()
+
+        //获取首页的数据
+        //requestHomeData()
+
         CommUtils.getHandler().postDelayed({
             showStateSuccess()
+            popopData()
+            mBinding.refreshLayout.finishRefresh()
         }, 1500)
     }
 
-    override fun onGoadingRetry() {
 
+    override fun onGoadingRetry() {
+        initData()
     }
 
     private fun initListener() {
-
+        mBinding.refreshLayout.setEnableNestedScroll(true)
+        mBinding.refreshLayout.setEnableLoadMore(false)
+        mBinding.refreshLayout.setEnableRefresh(true)
+        mBinding.refreshLayout.setOnRefreshListener(this)
     }
 
     override fun onRefresh(refreshLayout: RefreshLayout) {
+        initData()
 
+        CommUtils.getHandler().postDelayed({
+            popopData()
+            mBinding.refreshLayout.finishRefresh()
+        }, 1500)
     }
 
+    private fun popopData() {
+
+        val hotJobs = listOf("1", "2", "3", "4", "5")
+        val cityJobs = listOf("1", "2", "3", "4")
+        val areaJobs = listOf("1", "2", "3", "4", "5", "6")
+        val jobTips = listOf("1", "2", "3", "4")
+
+        mBinding.rvHotJob.horizontal()
+            .bindData(hotJobs, R.layout.item_home_part_time_job) { holder, t, _ ->
+
+                holder.getView<ImageView>(R.id.iv_job_image).extLoad(
+                    "http://malaysia-yyjobs-admin-dev.guabean.com/storage/202206/09/9NdPaX0fB66dFc4SMuR2kIqLDiJcVGjTW6vZ9hUu-690x410.png",
+                    R.drawable.placeholder_img_top_round_job, isCenterCrop = true, topRoundRadius = 5
+                )
 
-    private fun initRV() {
+                holder.itemView.click {
+                    toast("点击进入工作详情")
+                }
+            }
 
+        mBinding.rvCityJob.horizontal()
+            .bindData(cityJobs, R.layout.item_home_part_time_job) { holder, t, _ ->
+
+                holder.getView<ImageView>(R.id.iv_job_image).extLoad(
+                    "http://malaysia-yyjobs-admin-dev.guabean.com/storage/202206/09/9NdPaX0fB66dFc4SMuR2kIqLDiJcVGjTW6vZ9hUu-690x410.png",
+                    R.drawable.placeholder_img_top_round_job, isCenterCrop = true, topRoundRadius = 5
+                )
+
+                holder.itemView.click {
+                    toast("点击进入工作详情")
+                }
+            }
+
+        mBinding.rvAreaJob.horizontal()
+            .bindData(areaJobs, R.layout.item_home_part_time_job) { holder, t, _ ->
+
+                holder.getView<ImageView>(R.id.iv_job_image).extLoad(
+                    "http://malaysia-yyjobs-admin-dev.guabean.com/storage/202206/09/9NdPaX0fB66dFc4SMuR2kIqLDiJcVGjTW6vZ9hUu-690x410.png",
+                    R.drawable.placeholder_img_top_round_job, isCenterCrop = true, topRoundRadius = 5
+                )
+
+                holder.itemView.click {
+                    toast("点击进入工作详情")
+                }
+            }
+
+        mBinding.rvJobTips.vertical(2)
+            .bindData(jobTips, R.layout.item_home_job_tips) { holder, t, _ ->
+
+                holder.getView<ImageView>(R.id.iv_top_img).extLoad(
+                    "http://malaysia-yyjobs-admin-dev.guabean.com/storage/202206/09/9NdPaX0fB66dFc4SMuR2kIqLDiJcVGjTW6vZ9hUu-690x410.png",
+                    R.drawable.placeholder_img_top_round_job, isCenterCrop = true, topRoundRadius = 5
+                )
+
+                holder.itemView.click {
+                    toast("点击进入公告板详情")
+                }
+            }
     }
 
     override fun scrollTopRefresh() {
-
+        mBinding.scrollView.smoothScrollTo(0, 0)
+        mBinding.refreshLayout.autoRefresh()
     }
 
     /**
@@ -77,6 +154,21 @@ class HomeFragment : YYBaseVDBLoadingFragment<HomeViewModel, FragmentHomeBinding
      */
     inner class ClickProxy {
 
+        fun gotoWalletPage() {
+            toast("去钱包页面")
+        }
+
+        fun gotoRewardsPage() {
+            toast("去奖励页面")
+        }
+
+        fun gotoParttimePage() {
+            toast("去兼职页面")
+        }
+
+        fun gotoBulletinBoardPage() {
+            toast("去公告板页面")
+        }
     }
 
 

BIN=BIN
cpt_main/src/main/res/drawable-xxhdpi/chat_new_icon.webp


BIN=BIN
cpt_main/src/main/res/drawable-xxhdpi/home_part_job_more.webp


BIN=BIN
cpt_main/src/main/res/drawable-xxhdpi/home_top_more.webp


BIN=BIN
cpt_main/src/main/res/drawable-xxhdpi/home_top_point.webp


BIN=BIN
cpt_main/src/main/res/drawable-xxhdpi/home_top_wallet.webp


+ 248 - 4
cpt_main/src/main/res/layout/fragment_home.xml

@@ -44,7 +44,6 @@
                 app:layout_constraintRight_toRightOf="parent"
                 app:layout_constraintTop_toTopOf="parent" />
 
-
             <ImageView
                 android:id="@+id/iv_notify_icon"
                 android:layout_width="wrap_content"
@@ -100,11 +99,256 @@
                 android:layout_height="wrap_content" />
 
 
-            <TextView
+            <androidx.core.widget.NestedScrollView
+                android:id="@+id/scrollView"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:gravity="center"
-                android:text="HomePage" />
+                android:fillViewport="true"
+                android:scrollbars="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical">
+
+                    <!--金额和Point显示-->
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="56dp"
+                        android:orientation="horizontal">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <ImageView
+                                android:id="@+id/icon_wallet"
+                                android:layout_width="@dimen/d_28dp"
+                                android:layout_height="@dimen/d_28dp"
+                                android:layout_marginLeft="@dimen/d_16dp"
+                                android:src="@drawable/home_top_wallet"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintLeft_toLeftOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+                            <View
+                                android:layout_width="21dp"
+                                android:layout_height="10dp"
+                                android:layout_marginBottom="@dimen/d_20dp"
+                                android:background="@drawable/chat_new_icon"
+                                app:layout_constraintBottom_toBottomOf="@id/icon_wallet"
+                                app:layout_constraintLeft_toRightOf="@id/icon_wallet"
+                                app:layout_constraintRight_toRightOf="@id/icon_wallet" />
+
+                            <TextView
+                                android:id="@+id/tv_wallet_money"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/d_14dp"
+                                android:text="¥ 0"
+                                android:textColor="@color/black"
+                                android:textSize="@dimen/d_14sp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintLeft_toRightOf="@id/icon_wallet"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+                            <ImageView
+                                android:layout_width="5dp"
+                                android:layout_height="9dp"
+                                android:layout_marginLeft="@dimen/d_7dp"
+                                android:src="@drawable/home_top_more"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintLeft_toRightOf="@id/tv_wallet_money"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <View
+                            android:layout_width="@dimen/d_0.7dp"
+                            android:layout_height="match_parent"
+                            android:background="@color/divider_color_f0" />
+
+                        <LinearLayout
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <ImageView
+                                android:id="@+id/icon_rewards"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/d_19dp"
+                                android:src="@drawable/home_top_point"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintLeft_toLeftOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/d_10dp"
+                                android:text="0 积分"
+                                android:textColor="@color/black"
+                                android:textColorHint="@color/black"
+                                android:textSize="@dimen/d_14sp" />
+
+                            <ImageView
+                                android:layout_width="@dimen/d_5dp"
+                                android:layout_height="@dimen/d_9dp"
+                                android:layout_marginLeft="@dimen/d_7dp"
+                                android:src="@drawable/home_top_more" />
+
+
+                        </LinearLayout>
+
+                    </LinearLayout>
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="@dimen/d_10dp"
+                        android:background="@color/divider_color_f689" />
+
+                    <!--轮播-->
+                    <com.minminaya.widget.GeneralRoundConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_15dp"
+                        android:layout_marginTop="@dimen/d_16dp"
+                        android:layout_marginRight="@dimen/d_15dp"
+                        app:corner_radius="@dimen/d_5dp">
+
+                        <com.youth.banner.Banner
+                            android:id="@+id/banner"
+                            android:layout_width="match_parent"
+                            android:layout_height="0dp"
+                            android:background="@drawable/placeholder_img_banner"
+                            app:banner_auto_loop="true"
+                            app:banner_indicator_height="@dimen/d_5dp"
+                            app:banner_indicator_marginBottom="-3dp"
+                            app:banner_indicator_normal_color="@color/white"
+                            app:banner_indicator_normal_width="@dimen/d_7dp"
+                            app:banner_indicator_radius="@dimen/d_15dp"
+                            app:banner_indicator_selected_color="@color/page_bg"
+                            app:banner_indicator_selected_width="@dimen/d_17dp"
+                            app:banner_loop_time="5000"
+                            app:layout_constraintDimensionRatio="690:305"
+                            tools:ignore="MissingConstraints" />
+
+                    </com.minminaya.widget.GeneralRoundConstraintLayout>
+
+
+                    <!-- 热门 -->
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_15dp"
+                        android:layout_marginTop="@dimen/d_18dp"
+                        android:layout_weight="1"
+                        android:drawableRight="@drawable/home_part_job_more"
+                        android:drawablePadding="@dimen/d_11dp"
+                        android:text="热门兼职工作"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/d_17sp" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_hot_job"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_12dp"
+                        android:layout_marginTop="@dimen/d_15dp"
+                        android:overScrollMode="never" />
+
+                    <!-- 当地市的工作 -->
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_15dp"
+                        android:layout_marginTop="@dimen/d_18dp"
+                        android:layout_weight="1"
+                        android:drawableRight="@drawable/home_part_job_more"
+                        android:drawablePadding="@dimen/d_11dp"
+                        android:text="在武汉的工作"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/d_17sp" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_city_job"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_12dp"
+                        android:layout_marginTop="@dimen/d_15dp"
+                        android:overScrollMode="never" />
+
+                    <!-- 当地区域的工作 -->
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_15dp"
+                        android:layout_marginTop="@dimen/d_18dp"
+                        android:layout_weight="1"
+                        android:drawableRight="@drawable/home_part_job_more"
+                        android:drawablePadding="@dimen/d_11dp"
+                        android:text="在东西湖区的工作"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/d_17sp" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_area_job"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_12dp"
+                        android:layout_marginTop="@dimen/d_15dp"
+                        android:overScrollMode="never" />
+
+                    <!--Job Tips-->
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_18dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_15dp"
+                            android:layout_weight="1"
+                            android:text="YY 公告栏"
+                            android:textColor="@color/black"
+                            android:textSize="@dimen/d_17sp" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginRight="@dimen/d_15dp"
+                            android:text="查看全部"
+                            android:textColor="@color/text_blue_3779ff"
+                            android:textSize="@dimen/d_14sp" />
+
+                    </LinearLayout>
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_job_tips"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_12dp"
+                        android:layout_marginTop="@dimen/d_13dp"
+                        android:overScrollMode="never" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="@dimen/d_10dp" />
+
+                </LinearLayout>
+
+            </androidx.core.widget.NestedScrollView>
 
         </com.scwang.smart.refresh.layout.SmartRefreshLayout>
 

+ 52 - 0
cpt_main/src/main/res/layout/item_home_job_tips.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/ll_item_root"
+    android:layout_width="wrap_content"
+    android:layout_height="195dp"
+    android:layout_marginRight="@dimen/d_12dp"
+    android:layout_marginBottom="@dimen/d_12dp"
+    android:background="@drawable/home_item_promotion_bg"
+    android:orientation="vertical">
+
+    <com.guadou.cs_cptservices.widget.TopRound5ImageView
+        android:id="@+id/iv_top_img"
+        android:layout_width="match_parent"
+        android:layout_height="109dp"
+        android:layout_marginLeft="4dp"
+        android:layout_marginTop="4dp"
+        android:layout_marginRight="4dp"
+        android:scaleType="centerCrop"
+        android:src="@drawable/placeholder_img_top_round_tips" />
+
+    <TextView
+        android:id="@+id/tv_content_title"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/d_40dp"
+        android:layout_marginLeft="@dimen/d_10dp"
+        android:layout_marginTop="5dp"
+        android:layout_marginRight="@dimen/d_5dp"
+        android:ellipsize="end"
+        android:gravity="center_vertical"
+        android:lines="2"
+        android:text="在中国排名前十的兼职类型"
+        android:textColor="@color/black"
+        android:textSize="@dimen/d_14sp" />
+
+
+    <TextView
+        android:id="@+id/tv_sub_titme"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_12dp"
+        android:layout_marginTop="@dimen/d_5dp"
+        android:layout_marginRight="@dimen/d_10dp"
+        android:ellipsize="end"
+        android:lines="1"
+        android:singleLine="true"
+        android:text="销售、外卖员、清洁工 发传单 修理工"
+        android:textColor="@color/gray_9a"
+        android:textSize="@dimen/d_12dp" />
+
+
+</LinearLayout>

+ 101 - 0
cpt_main/src/main/res/layout/item_home_part_time_job.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/ll_item_root"
+    android:layout_width="145dp"
+    android:layout_height="200dp"
+    android:layout_marginRight="@dimen/d_3dp"
+    android:background="@drawable/home_item_job_bg"
+    android:orientation="vertical">
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <com.guadou.cs_cptservices.widget.TopRound5ImageView
+            android:id="@+id/iv_job_image"
+            android:layout_width="match_parent"
+            android:layout_height="101dp"
+            android:layout_marginLeft="4dp"
+            android:layout_marginTop="6.2dp"
+            android:layout_marginRight="4dp"
+            android:scaleType="centerCrop"
+            tools:src="@drawable/placeholder_img_top_round_job" />
+
+        <TextView
+            android:id="@+id/tv_job_tag"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8.5dp"
+            android:layout_marginTop="8.5dp"
+            android:background="@drawable/shape_blue_round3"
+            android:paddingLeft="@dimen/d_6dp"
+            android:paddingTop="@dimen/d_3dp"
+            android:paddingRight="@dimen/d_6dp"
+            android:paddingBottom="@dimen/d_4dp"
+            android:text="立即预定"
+            android:textColor="@color/white"
+            android:textSize="@dimen/d_12sp" />
+    </FrameLayout>
+
+    <TextView
+        android:id="@+id/tv_job_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_10dp"
+        android:layout_marginTop="@dimen/d_8dp"
+        android:layout_marginRight="@dimen/d_10dp"
+        android:ellipsize="end"
+        android:lines="2"
+        android:text="香格里拉酒店前台 服务生招聘"
+        android:textColor="@color/text_black_37"
+        android:textSize="@dimen/d_14sp" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_10dp"
+        android:layout_marginTop="@dimen/d_7dp"
+        android:layout_marginRight="@dimen/d_10dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/tv_job_hour_rate"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="¥ 8"
+            android:textColor="@color/app_blue"
+            android:textSize="@dimen/d_15sp" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="/时"
+            android:textColor="@color/gray_76"
+            android:textSize="@dimen/d_13sp" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="1dp"
+            android:layout_weight="1" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="总计"
+            android:textColor="@color/gray_76"
+            android:textSize="@dimen/d_13sp" />
+
+        <TextView
+            android:id="@+id/tv_job_est"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/d_5dp"
+            android:text="¥80"
+            android:textColor="@color/profile_red"
+            android:textSize="@dimen/d_15sp" />
+
+    </LinearLayout>
+
+</LinearLayout>

+ 36 - 0
cs_baselib/src/main/java/com/guadou/lib_baselib/engine/ImageViewExt.kt

@@ -13,6 +13,8 @@ import com.bumptech.glide.request.target.SimpleTarget
 import com.bumptech.glide.request.target.Target
 import com.bumptech.glide.request.transition.Transition
 import com.guadou.lib_baselib.glideconfig.GlideApp
+import com.guadou.lib_baselib.transform.RoundCornersTransformation
+import com.guadou.lib_baselib.utils.CommUtils
 import pl.droidsonroids.gif.GifDrawable
 import java.io.File
 import java.io.IOException
@@ -41,6 +43,8 @@ fun ImageView.extLoad(
     isCircle: Boolean = false,
     isCenterCrop: Boolean = false,
     roundRadius: Int = 0,
+    topRoundRadius: Int = 0,
+    bottomRoundRadius: Int = 0,
     placeholder: Drawable? = null,
     isCrossFade: Boolean = false,
     isForceOriginalSize: Boolean = false
@@ -70,6 +74,38 @@ fun ImageView.extLoad(
             } else {
                 transform(RoundedCorners(roundRadius))
             }
+        } else if (topRoundRadius != 0) {
+            if (scaleType == ImageView.ScaleType.CENTER_CROP) {
+                transforms(
+                    CenterCrop(), RoundCornersTransformation(
+                        context, CommUtils.dip2px(topRoundRadius),
+                        RoundCornersTransformation.CornerType.TOP
+                    )
+                )
+            } else {
+                transform(
+                    RoundCornersTransformation(
+                        context, CommUtils.dip2px(topRoundRadius),
+                        RoundCornersTransformation.CornerType.TOP
+                    )
+                )
+            }
+        } else if (bottomRoundRadius != 0) {
+            if (scaleType == ImageView.ScaleType.CENTER_CROP) {
+                transforms(
+                    CenterCrop(), RoundCornersTransformation(
+                        context, CommUtils.dip2px(bottomRoundRadius),
+                        RoundCornersTransformation.CornerType.BOTTOM
+                    )
+                )
+            } else {
+                transform(
+                    RoundCornersTransformation(
+                        context, CommUtils.dip2px(bottomRoundRadius),
+                        RoundCornersTransformation.CornerType.BOTTOM
+                    )
+                )
+            }
         }
         if (isForceOriginalSize) {
             override(Target.SIZE_ORIGINAL)

+ 2 - 1
cs_baselib/src/main/java/com/guadou/lib_baselib/transform/RoundCornersTransformation.java

@@ -21,8 +21,9 @@ import java.security.MessageDigest;
 
 
 /**
- * Glide加载圆角
+ * Glide加载圆角 单独设置部分圆角
  * 圆角BitmapTransformation.它兼容transform,可以和transform共存
+ *
  * .bitmapTransform(new CenterCrop(mContext), new RoundCornersTransformation(
  * UIUtils.getContext(),
  * UIUtils.dip2px(15),MediaLoader

+ 2 - 0
cs_baselib/src/main/res/values/colors.xml

@@ -9,6 +9,8 @@
     <color name="white">#ffffff</color>
     <color name="black">#000000</color>
     <color name="divider_color">#D2D2D2</color>
+    <color name="divider_color_f0">#f0f0f0</color>
+    <color name="divider_color_f689">#f6f8f9</color>
     <color name="gray">#cccccc</color>
 
     <!--  设备系统小于6.0的时候状态栏的灰色背景  -->

+ 87 - 0
cs_cptServices/src/main/java/com/guadou/cs_cptservices/widget/TopRound5ImageView.java

@@ -0,0 +1,87 @@
+package com.guadou.cs_cptservices.widget;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Path;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.View;
+
+import androidx.appcompat.widget.AppCompatImageView;
+
+import com.guadou.lib_baselib.utils.CommUtils;
+
+
+public class TopRound5ImageView extends AppCompatImageView {
+    float width, height;
+    private int defaultRadius = CommUtils.dip2px(5);
+
+    private int leftTopRadius;
+    private int rightTopRadius;
+    private int rightBottomRadius = 0;
+    private int leftBottomRadius = 0;
+
+    public TopRound5ImageView(Context context) {
+        this(context, null);
+        init(context, null);
+    }
+
+    public TopRound5ImageView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+        init(context, attrs);
+    }
+
+    public TopRound5ImageView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init(context, attrs);
+    }
+
+    private void init(Context context, AttributeSet attrs) {
+        if (Build.VERSION.SDK_INT < 18) {
+            setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+        }
+
+//        setBackground(getContext().getResources().getDrawable(R.drawable.iv_emergency_report_detail_pictrue));
+
+        leftTopRadius = defaultRadius;
+        rightTopRadius = defaultRadius;
+
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        super.onLayout(changed, left, top, right, bottom);
+        width = getWidth();
+        height = getHeight();
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        int maxLeft = Math.max(leftTopRadius, leftBottomRadius);
+        int maxRight = Math.max(rightTopRadius, rightBottomRadius);
+        int minWidth = maxLeft + maxRight;
+        int maxTop = Math.max(leftTopRadius, rightTopRadius);
+        int maxBottom = Math.max(leftBottomRadius, rightBottomRadius);
+        int minHeight = maxTop + maxBottom;
+        if (width >= minWidth && height > minHeight) {
+            Path path = new Path();
+            //四个角:右上,右下,左下,左上
+            path.moveTo(leftTopRadius, 0);
+            path.lineTo(width - rightTopRadius, 0);
+            path.quadTo(width, 0, width, rightTopRadius);
+
+            path.lineTo(width, height - rightBottomRadius);
+            path.quadTo(width, height, width - rightBottomRadius, height);
+
+            path.lineTo(leftBottomRadius, height);
+            path.quadTo(0, height, 0, height - leftBottomRadius);
+
+            path.lineTo(0, leftTopRadius);
+            path.quadTo(0, 0, leftTopRadius, 0);
+
+            canvas.clipPath(path);
+        }
+        super.onDraw(canvas);
+    }
+
+}

BIN=BIN
cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_banner.png


BIN=BIN
cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_top_round_job.webp


BIN=BIN
cs_cptServices/src/main/res/drawable-xhdpi/placeholder_img_top_round_tips.webp


BIN=BIN
cs_cptServices/src/main/res/drawable-xxhdpi/home_item_job_bg.webp


BIN=BIN
cs_cptServices/src/main/res/drawable-xxhdpi/home_item_promotion_bg.webp


+ 5 - 1
cs_cptServices/src/main/res/values/colors.xml

@@ -7,20 +7,24 @@
     <color name="gray_99">#999999</color>
     <color name="gray_88">#888888</color>
     <color name="gray_66">#666666</color>
+    <color name="gray_76">#767676</color>
+    <color name="gray_9a">#9a9a9a</color>
     <color name="black_33">#333333</color>
     <color name="main_divider">#ECECEC</color>
     <color name="text_orange">#FD4C00</color>
     <color name="text_blue">#008CFF</color>
+    <color name="text_blue_3779ff">#3779FF</color>
     <color name="profile_red">#FF5E75</color>
     <color name="part_share_btn_bg">#f2f2f2</color>
     <color name="dark_blue">#175285</color>
     <color name="divider_color_ee">#eeeeee</color>
     <color name="notify_dark_blue">#2956B7</color>
-    <color name="gray_76">#767676</color>
+
     <color name="white_pressed">#33888888</color>
     <color name="divider_gray_c5">#C5C5C5</color>
     <color name="withdrawal_success_text">#00B820</color>
     <color name="custom_dialog_yes_text">#313B68</color>
     <color name="light_gray_divider">#EDF0F3</color>
+    <color name="text_black_37">#373737</color>
 
 </resources>

+ 3 - 1
cs_cptServices/src/main/res/values/strings.xml

@@ -1,7 +1,9 @@
-<resources xmlns:tools="http://schemas.android.com/tools">
+<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
 
     <string name="ewallet_balance_available" tools:ignore="MissingTranslation">
         <![CDATA[<font color="#888888">当前可提现</font><font color="#0689FB">%1$s</font><font color="#888888">元,单笔提现限额10000.00元</font>]]>
     </string>
 
+    <string name="normal_empty">-</string>
+
 </resources>