Browse Source

行业的页面-启动并返回-复显等逻辑

liukai 2 years ago
parent
commit
f54a8ca98a
27 changed files with 683 additions and 97 deletions
  1. 2 0
      cpt_parttime/src/main/AndroidManifest.xml
  2. 13 0
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/bean/IndustryBean.java
  3. 4 1
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/mvvm/PartTimeHomeViewModel.kt
  4. 92 0
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/mvvm/PartTimeIndustryViewModel.kt
  5. 3 5
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/activity/PartJobAlbumActivity.kt
  6. 99 0
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/activity/PartTimeIndustryActivity.kt
  7. 9 5
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/fragment/PartJobDetailFragment.kt
  8. 37 10
      cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/main/PartTimeHomeFragment.kt
  9. 0 2
      cpt_parttime/src/main/res/color/selector_filter_industry.xml
  10. 12 0
      cpt_parttime/src/main/res/drawable/shape_home_list_border_bg.xml
  11. 16 16
      cpt_parttime/src/main/res/layout/activity_part_job_edit_profile_info.xml
  12. 73 0
      cpt_parttime/src/main/res/layout/activity_parttime_industry.xml
  13. 18 9
      cpt_parttime/src/main/res/layout/fragment_parttime_main.xml
  14. 87 0
      cpt_parttime/src/main/res/layout/item_part_time_industry.xml
  15. 2 0
      cs_baselib/src/main/res/layout/easy_titlebar.xml
  16. 148 0
      cs_baselib/src/main/res/layout/layout_placeholder_grid.xml
  17. 49 19
      cs_baselib/src/main/res/values/styles.xml
  18. 10 1
      cs_cptServices/src/main/java/com/guadou/cs_cptservices/binding/BaseDataBindingAdapter.kt
  19. BIN
      cs_cptServices/src/main/res/drawable-xhdpi/filter_choose.webp
  20. BIN
      cs_cptServices/src/main/res/drawable-xhdpi/filter_unchoose.webp
  21. BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/filter_choose.webp
  22. BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/filter_unchoose.webp
  23. 0 0
      cs_cptServices/src/main/res/drawable/selector_check_red_10padding.xml
  24. 0 0
      cs_cptServices/src/main/res/drawable/selector_check_red_big_10padding.xml
  25. 9 0
      cs_cptServices/src/main/res/drawable/selector_check_red_white.xml
  26. 0 0
      cs_cptServices/src/main/res/drawable/selector_radio_red_circle_10padding.xml
  27. 0 29
      cs_cptServices/src/main/res/values/styles.xml

+ 2 - 0
cpt_parttime/src/main/AndroidManifest.xml

@@ -18,6 +18,8 @@
 
         <activity android:name=".ui.ResetPasswordActivity"/>
 
+        <activity android:name=".ui.activity.PartTimeIndustryActivity"/>
+
     </application>
 
 </manifest>

+ 13 - 0
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/bean/IndustryBean.java

@@ -0,0 +1,13 @@
+package com.hongyegroup.cpt_parttime.bean;
+
+
+public class IndustryBean {
+
+    public String industry_id;
+    public String industry_name;
+    public String industry_image;
+    public String jobs_count;
+
+    public boolean isSelected;
+
+}

+ 4 - 1
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/mvvm/PartTimeHomeViewModel.kt

@@ -23,6 +23,8 @@ class PartTimeHomeViewModel @Inject constructor(
     private val savedStateHandle: SavedStateHandle
 ) : BaseViewModel() {
 
+    var mFilterIndustryIds: ArrayList<String>? = null   //筛选的行业Ids
+
     val mKeywordLiveData = MutableLiveData<String>()  //搜索Key值
     var mCurPage = 1
     var isNeedPlaceHolder = true
@@ -75,8 +77,9 @@ class PartTimeHomeViewModel @Inject constructor(
                 return@withContext list
             }
 
-            loadSuccess()
+
             handleData(result)
+            loadSuccess()
             liveData.postValue(true)
 
             //返回的数据是封装过的,检查是否成功

+ 92 - 0
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/mvvm/PartTimeIndustryViewModel.kt

@@ -0,0 +1,92 @@
+package com.hongyegroup.cpt_parttime.mvvm
+
+import android.annotation.SuppressLint
+import android.view.View
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.SavedStateHandle
+import com.guadou.cs_cptservices.binding.BaseDataBindingAdapter
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.guadou.lib_baselib.ext.checkEmpty
+import com.guadou.lib_baselib.utils.CommUtils
+import com.hongyegroup.cpt_parttime.BR
+import com.hongyegroup.cpt_parttime.R
+import com.hongyegroup.cpt_parttime.bean.IndustryBean
+import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import javax.inject.Inject
+
+@HiltViewModel
+class PartTimeIndustryViewModel @Inject constructor(
+    private val savedStateHandle: SavedStateHandle
+) : BaseViewModel() {
+
+    var mDatas = mutableListOf<IndustryBean>()
+    val mAdapter by lazy { BaseDataBindingAdapter(R.layout.item_part_time_industry, BR.item, mDatas) }
+
+
+    /**
+     * 获取行业列表
+     */
+    fun getIndustryList(selectedIds: ArrayList<String>?): LiveData<Boolean> {
+        val liveData = MutableLiveData<Boolean>()
+
+        launchOnUI {
+            //开始Loading
+            loadStartLoading()
+            val result = withContext(Dispatchers.IO) {
+                delay(1500)
+
+                val list = mutableListOf<IndustryBean>()
+                for (i in 1..10) {
+                    list.add(IndustryBean().apply {
+                        industry_id = i.toString()
+                        industry_image = "http://yyjobs.sg/storage/201808/17/eVvOzW6QuxmVPiPtyjo6iSgw0AwRY08YP9fTHVfH.png"
+                    })
+                }
+                return@withContext list
+            }
+
+            loadSuccess()
+            handleData(result, selectedIds)
+            liveData.postValue(true)
+
+        }
+
+        return liveData
+    }
+
+    //处理数据-添加或刷新
+    @SuppressLint("NotifyDataSetChanged")
+    private fun handleData(list: List<IndustryBean>?, selectedIds: ArrayList<String>?) {
+        if (!list.checkEmpty()) {
+
+            mDatas.clear()
+
+            //添加已经选中的标记出来
+            if (!selectedIds.checkEmpty()) {
+                list!!.forEach {
+                    it.isSelected = selectedIds!!.contains(it.industry_id)
+                    mDatas.add(it)
+                }
+            } else {
+                mDatas.addAll(list!!)
+            }
+
+            mAdapter.notifyDataSetChanged()
+
+        } else {
+            //展示无数据
+            mDatas.clear()
+            mAdapter.notifyDataSetChanged()
+            //展示无数据的布局
+            val emptyView: View = CommUtils.inflate(R.layout.item_empty_layout)
+            mAdapter.setEmptyView(emptyView)
+
+        }
+
+    }
+
+}

+ 3 - 5
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/activity/PartJobAlbumActivity.kt

@@ -1,6 +1,5 @@
 package com.hongyegroup.cpt_parttime.ui.activity
 
-import android.content.Intent
 import android.os.Bundle
 import android.view.ViewGroup
 import android.widget.ImageView
@@ -11,6 +10,8 @@ import com.guadou.lib_baselib.bean.DataBindingConfig
 import com.guadou.lib_baselib.engine.ImagePreviewUtils
 import com.guadou.lib_baselib.engine.extLoad
 import com.guadou.lib_baselib.ext.click
+import com.guadou.lib_baselib.ext.commContext
+import com.guadou.lib_baselib.ext.gotoActivity
 import com.guadou.lib_baselib.ext.vertical
 import com.guadou.lib_baselib.utils.CommUtils
 import com.hongyegroup.cpt_parttime.R
@@ -28,10 +29,7 @@ class PartJobAlbumActivity : YYBaseVDBActivity<EmptyViewModel, ActivityParttimeJ
 
     companion object {
         fun startInstance() {
-            val context = CommUtils.getContext()
-            val intent = Intent(context, PartJobAlbumActivity::class.java)
-            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
-            context.startActivity(intent)
+            commContext().gotoActivity<PartJobAlbumActivity>()
         }
     }
 

+ 99 - 0
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/activity/PartTimeIndustryActivity.kt

@@ -0,0 +1,99 @@
+package com.hongyegroup.cpt_parttime.ui.activity
+
+import android.annotation.SuppressLint
+import android.content.Intent
+import android.os.Bundle
+import com.guadou.cs_cptservices.base.activity.YYBaseVDBLoadingActivity
+import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.ext.click
+import com.guadou.lib_baselib.ext.vertical
+import com.guadou.lib_baselib.view.gloading.GLoadingTitleStatus
+import com.guadou.lib_baselib.view.gloading.Gloading
+import com.guadou.lib_baselib.view.gloading.GloadingPlaceHolderlAdapter
+import com.hongyegroup.cpt_parttime.R
+import com.hongyegroup.cpt_parttime.databinding.ActivityParttimeIndustryBinding
+import com.hongyegroup.cpt_parttime.mvvm.PartTimeIndustryViewModel
+import com.scwang.smart.refresh.layout.api.RefreshLayout
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener
+import dagger.hilt.android.AndroidEntryPoint
+
+@AndroidEntryPoint
+class PartTimeIndustryActivity : YYBaseVDBLoadingActivity<PartTimeIndustryViewModel, ActivityParttimeIndustryBinding>(), OnRefreshListener {
+
+    var selectedIds: ArrayList<String>? = null
+
+    //重新生成GLoading对象
+    override fun generateGLoading(): Gloading.Holder {
+        return Gloading.from(GloadingPlaceHolderlAdapter(R.layout.layout_placeholder_grid))
+            .wrap(this, GLoadingTitleStatus(true, true, false))
+            .withRetry { onGoadingRetry() }
+    }
+
+    override fun getDataBindingConfig(): DataBindingConfig {
+        return DataBindingConfig(R.layout.activity_parttime_industry)
+    }
+
+    override fun getDataFromIntent(intent: Intent) {
+        selectedIds = intent.getStringArrayListExtra("industryIds")
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+        initRV()
+        initData()
+        initListener()
+    }
+
+    private fun initData() {
+        mViewModel.getIndustryList(selectedIds).observe(this) {
+            mBinding.refreshLayout.finishRefresh()
+        }
+    }
+
+    private fun initRV() {
+        mBinding.recyclerView.vertical(2).adapter = mViewModel.mAdapter
+    }
+
+    @SuppressLint("NotifyDataSetChanged")
+    private fun initListener() {
+        mViewModel.mAdapter.loadMoreModule.isEnableLoadMore = false
+
+        //刷新控件初始化
+        mBinding.refreshLayout.setEnableNestedScroll(true)
+        mBinding.refreshLayout.setEnableLoadMore(false)
+        mBinding.refreshLayout.setEnableRefresh(true)
+        mBinding.refreshLayout.setOnRefreshListener(this)
+
+        //点击事件
+        mViewModel.mAdapter.setOnItemClickListener { _, view, position ->
+            mViewModel.mDatas[position].apply {
+                isSelected = !isSelected
+            }
+            mViewModel.mAdapter.notifyItemChanged(position, "check")
+        }
+
+        mBinding.easyTitle.addRightText("重置") {
+            mViewModel.mDatas.forEach {
+                it.isSelected = false
+            }
+            mViewModel.mAdapter.notifyDataSetChanged()
+        }
+
+        //点击提交
+        mBinding.buttonApply.click {
+            val list = mViewModel.mDatas.filter { it.isSelected }.map { it.industry_id }
+            setResult(RESULT_OK, Intent().apply {
+                putStringArrayListExtra("industryIds", ArrayList(list))
+            })
+            finish()
+        }
+    }
+
+    override fun onRefresh(refreshLayout: RefreshLayout) {
+        initData()
+    }
+
+    override fun startObserve() {
+
+    }
+
+}

+ 9 - 5
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/fragment/PartJobDetailFragment.kt

@@ -1,6 +1,7 @@
 package com.hongyegroup.cpt_parttime.ui.fragment
 
 import android.os.Bundle
+import android.view.View
 import androidx.databinding.DataBindingUtil
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLoadingFragment
 import com.guadou.cs_cptservices.interfaces.IFragmentRefresh
@@ -9,6 +10,9 @@ import com.guadou.lib_baselib.engine.toast
 import com.guadou.lib_baselib.ext.checkEmpty
 import com.guadou.lib_baselib.ext.vertical
 import com.guadou.lib_baselib.utils.log.YYLogUtils
+import com.guadou.lib_baselib.view.gloading.GLoadingTitleStatus
+import com.guadou.lib_baselib.view.gloading.Gloading
+import com.guadou.lib_baselib.view.gloading.GloadingPlaceHolderlAdapter
 import com.hongyegroup.cpt_parttime.BR
 import com.hongyegroup.cpt_parttime.R
 import com.hongyegroup.cpt_parttime.databinding.FragmentParttimeJobDetailBinding
@@ -25,11 +29,11 @@ class PartJobDetailFragment : YYBaseVDBLoadingFragment<PartJobDetailChildViewMod
     private val mClickProxy by lazy { ClickProxy() }
 
     //重新生成GLoading对象-跳动动画
-//    override fun generateGLoading(view: View): Gloading.Holder {
-//        return Gloading.from(GloadingPlaceHolderlAdapter(R.layout.layout_placeholder_part_time_detail_child))
-//            .wrap(view, GLoadingTitleStatus(false, true, false))
-//            .withRetry { onGoadingRetry() }
-//    }
+    override fun generateGLoading(view: View): Gloading.Holder {
+        return Gloading.from(GloadingPlaceHolderlAdapter(R.layout.layout_placeholder_part_time_detail_child))
+            .wrap(view, GLoadingTitleStatus(false, true, false))
+            .withRetry { onGoadingRetry() }
+    }
 
     override fun getDataBindingConfig(): DataBindingConfig {
         return DataBindingConfig(R.layout.fragment_parttime_job_detail, BR.viewModel, mViewModel)

+ 37 - 10
cpt_parttime/src/main/java/com/hongyegroup/cpt_parttime/ui/main/PartTimeHomeFragment.kt

@@ -1,15 +1,19 @@
 package com.hongyegroup.cpt_parttime.ui.main
 
+import android.app.Activity.RESULT_OK
+import android.content.Intent
 import android.graphics.Color
 import android.os.Bundle
 import android.view.View
 import android.widget.TextView
+import androidx.activity.result.contract.ActivityResultContracts
 import com.chad.library.adapter.base.listener.OnLoadMoreListener
 import com.gavin.com.library.PowerfulStickyDecoration
 import com.gavin.com.library.listener.PowerGroupListener
 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.ext.checkEmpty
 import com.guadou.lib_baselib.ext.dp2px
 import com.guadou.lib_baselib.ext.horizontal
 import com.guadou.lib_baselib.ext.vertical
@@ -21,10 +25,12 @@ import com.hongyegroup.cpt_parttime.BR
 import com.hongyegroup.cpt_parttime.R
 import com.hongyegroup.cpt_parttime.databinding.FragmentParttimeMainBinding
 import com.hongyegroup.cpt_parttime.mvvm.PartTimeHomeViewModel
+import com.hongyegroup.cpt_parttime.ui.activity.PartTimeIndustryActivity
 import com.hongyegroup.cpt_parttime.ui.activity.PartTimeJobDetailActivity
 import com.scwang.smart.refresh.layout.api.RefreshLayout
 import com.scwang.smart.refresh.layout.listener.OnRefreshListener
 import kotlinx.coroutines.flow.MutableStateFlow
+import java.util.*
 
 /**
  * 兼职模块的首页Frgment
@@ -32,6 +38,13 @@ import kotlinx.coroutines.flow.MutableStateFlow
 class PartTimeHomeFragment : YYBaseVDBLoadingFragment<PartTimeHomeViewModel, FragmentParttimeMainBinding>(), IFragmentRefresh, OnRefreshListener,
     OnLoadMoreListener {
 
+    private val startForResultLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
+        if (result.resultCode == RESULT_OK) {
+            val industryIds = result.data?.getStringArrayListExtra("industryIds")
+            setIndustryFilter(industryIds)
+        }
+    }
+
     private var mTopDecoration: PowerfulStickyDecoration? = null
     private val mClickProxy by lazy { ClickProxy() }
 
@@ -60,11 +73,6 @@ class PartTimeHomeFragment : YYBaseVDBLoadingFragment<PartTimeHomeViewModel, Fra
         mViewModel.requestJobList().observe(this) {
             mBinding.refreshLayout.finishRefresh()
             mViewModel.mAllJobAdapter.loadMoreModule.isEnableLoadMore = true
-
-            //清楚悬停头缓存
-            if (mViewModel.isNeedCleanAllData) {
-                mTopDecoration?.clearCache()
-            }
         }
     }
 
@@ -165,12 +173,26 @@ class PartTimeHomeFragment : YYBaseVDBLoadingFragment<PartTimeHomeViewModel, Fra
 
     }
 
+    //设置行业的筛选选中
+    private fun setIndustryFilter(industryIds: ArrayList<String>?) {
+        mViewModel.mFilterIndustryIds = industryIds
+        //设置是否选中
+        mClickProxy.filterIndustryFlow.value = !industryIds.checkEmpty()
+    }
+
     /**
      * DataBinding事件处理
      */
     inner class ClickProxy {
 
-        var filterIndex = MutableStateFlow(-1)
+        var filterIndustryFlow = MutableStateFlow(false)
+        var filterDateFlow = MutableStateFlow(false)
+        var filterOptionFlow = MutableStateFlow(false)
+
+        //关闭Activity
+        fun backPage() {
+            mActivity.finish()
+        }
 
         //执行搜索
         fun doSearch() {
@@ -186,7 +208,9 @@ class PartTimeHomeFragment : YYBaseVDBLoadingFragment<PartTimeHomeViewModel, Fra
 
         //重置筛选的条件
         fun searchReset() {
-            filterIndex.value = -1
+            filterIndustryFlow.value = false
+            filterDateFlow.value = false
+            filterOptionFlow.value = false
             mViewModel.mKeywordLiveData.value = ""
             doSearch()
         }
@@ -197,15 +221,18 @@ class PartTimeHomeFragment : YYBaseVDBLoadingFragment<PartTimeHomeViewModel, Fra
         }
 
         fun filterIndustry() {
-            filterIndex.value = 0
+            //带返回值的启动
+            startForResultLauncher.launch(
+                Intent(mActivity, PartTimeIndustryActivity::class.java).putExtra("industryIds", mViewModel.mFilterIndustryIds)
+            )
         }
 
         fun filterDate() {
-            filterIndex.value = 1
+            filterDateFlow.value = true
         }
 
         fun filterOption() {
-            filterIndex.value = 2
+            filterOptionFlow.value = true
         }
 
     }

+ 0 - 2
cpt_parttime/src/main/res/color/selector_filter_industry.xml

@@ -2,10 +2,8 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:color="@color/white" android:state_selected="true" />
     <item android:color="@color/white" android:state_active="true" />
-    <item android:color="@color/white" android:state_pressed="true" />
     <item android:color="@color/white" android:state_checked="true" />
     <item android:color="@color/text_yellow_ff9300" android:state_selected="false" />
     <item android:color="@color/text_yellow_ff9300" android:state_active="false" />
-    <item android:color="@color/text_yellow_ff9300" android:state_pressed="false" />
     <item android:color="@color/text_yellow_ff9300" android:state_checked="false" />
 </selector>

+ 12 - 0
cpt_parttime/src/main/res/drawable/shape_home_list_border_bg.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <padding
+        android:bottom="0.5dp"
+        android:left="0.5dp"
+        android:right="0.5dp"
+        android:top="0.5dp" />
+    <stroke
+        android:width="0.5dp"
+        android:color="#E5E5E5" />
+
+</shape>

+ 16 - 16
cpt_parttime/src/main/res/layout/activity_part_job_edit_profile_info.xml

@@ -1127,7 +1127,7 @@
                                 android:layout_height="wrap_content"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="英语"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1141,7 +1141,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="中文"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1155,7 +1155,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="马来语"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1178,7 +1178,7 @@
                                 android:layout_height="wrap_content"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="泰米尔语"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1192,7 +1192,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="北印度语"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1206,7 +1206,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="其他"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1658,7 +1658,7 @@
                             android:layout_marginLeft="@dimen/d_20dp"
                             android:layout_marginBottom="@dimen/d_20dp"
                             android:background="@color/transparent"
-                            android:button="@drawable/selector_check_red_square"
+                            android:button="@drawable/selector_check_red_big_10padding"
                             android:checked="false"
                             android:clickable="true"
                             android:text="与住宅地址相同"
@@ -1722,7 +1722,7 @@
                                 android:layout_height="wrap_content"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="短信"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1736,7 +1736,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="电话"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1750,7 +1750,7 @@
                                 android:layout_marginLeft="3dp"
                                 android:layout_weight="1"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_square"
+                                android:button="@drawable/selector_check_red_big_10padding"
                                 android:text="邮箱"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp"
@@ -1765,7 +1765,7 @@
                             android:layout_marginLeft="@dimen/d_20dp"
                             android:layout_marginBottom="@dimen/d_25dp"
                             android:background="@color/transparent"
-                            android:button="@drawable/selector_check_red_square"
+                            android:button="@drawable/selector_check_red_big_10padding"
                             android:text="其他"
                             android:textColor="@color/profile_black_8098b2"
                             android:textSize="14sp"
@@ -1827,7 +1827,7 @@
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_circle"
+                                android:button="@drawable/selector_radio_red_circle_10padding"
                                 android:text="是"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp" />
@@ -1839,7 +1839,7 @@
                                 android:layout_marginStart="30dp"
                                 android:layout_marginLeft="30dp"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_circle"
+                                android:button="@drawable/selector_radio_red_circle_10padding"
                                 android:text="@string/no"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp" />
@@ -1926,7 +1926,7 @@
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_circle"
+                                android:button="@drawable/selector_radio_red_circle_10padding"
                                 android:text="是"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp" />
@@ -1938,7 +1938,7 @@
                                 android:layout_marginStart="30dp"
                                 android:layout_marginLeft="30dp"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red_circle"
+                                android:button="@drawable/selector_radio_red_circle_10padding"
                                 android:text="@string/no"
                                 android:textColor="@color/profile_black_8098b2"
                                 android:textSize="14sp" />
@@ -2023,7 +2023,7 @@
                                 android:layout_height="wrap_content"
                                 android:layout_marginLeft="@dimen/d_20dp"
                                 android:background="@color/transparent"
-                                android:button="@drawable/selector_check_red"
+                                android:button="@drawable/selector_check_red_10padding"
                                 android:gravity="top"
                                 android:theme="@style/AppThemeLight" />
 

+ 73 - 0
cpt_parttime/src/main/res/layout/activity_parttime_industry.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:binding="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:ignore="RtlHardcoded">
+
+    <data>
+
+    </data>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
+            android:id="@+id/easy_title"
+            android:layout_width="match_parent"
+            app:Easy_menuTextSize="@dimen/d_15sp"
+            android:layout_height="wrap_content"
+            app:Easy_menuTextColor="@color/profile_red"
+            app:Easy_title="选择行业" />
+
+        <com.scwang.smart.refresh.layout.SmartRefreshLayout
+            android:id="@+id/refresh_layout"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            app:srlEnablePreviewInEditMode="true"
+            app:srlPrimaryColor="@color/white">
+
+            <com.scwang.smart.refresh.header.ClassicsHeader
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingRight="@dimen/d_10dp"
+                android:scrollbars="none" />
+
+        </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom"
+            android:background="#90ffffff">
+
+            <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                android:id="@+id/button_apply"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d_42dp"
+                android:layout_marginLeft="@dimen/d_35dp"
+                android:layout_marginTop="@dimen/d_25dp"
+                android:layout_marginRight="@dimen/d_35dp"
+                android:layout_marginBottom="@dimen/d_25dp"
+                android:background="@drawable/selector_app_blue_button_round2_bg"
+                android:gravity="center"
+                android:text="确认"
+                android:textColor="@color/white"
+                android:textSize="@dimen/d_16sp" />
+
+        </FrameLayout>
+
+    </LinearLayout>
+
+</layout>

+ 18 - 9
cpt_parttime/src/main/res/layout/fragment_parttime_main.xml

@@ -39,6 +39,15 @@
             android:paddingLeft="@dimen/d_15dp"
             android:paddingRight="@dimen/d_15dp">
 
+            <ImageButton
+                binding:clicks="@{click.backPage}"
+                android:layout_marginTop="1.5dp"
+                style="@style/SelectableItemBackgroundLess"
+                android:theme="@style/RippleWhite"
+                android:src="@mipmap/iv_blue_back"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+
             <LinearLayout
                 android:layout_width="0dp"
                 android:layout_height="32dp"
@@ -109,7 +118,7 @@
                 android:id="@+id/tv_filter_industry"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@{click.filterIndex == 0? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
+                android:background="@{click.filterIndustryFlow? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
                 android:drawableLeft="@drawable/industry_black"
                 android:drawablePadding="@dimen/d_8dp"
                 android:paddingLeft="@dimen/d_21dp"
@@ -117,7 +126,7 @@
                 android:paddingRight="@dimen/d_24dp"
                 android:paddingBottom="@dimen/d_9dp"
                 android:text="行业"
-                android:textColor="@{click.filterIndex == 0? @color/white : @color/black}"
+                android:textColor="@{click.filterIndustryFlow ? @color/white : @color/black}"
                 android:textSize="@dimen/d_16sp"
                 app:drawableTint="@color/selector_filter_industry"
                 app:layout_constraintBottom_toBottomOf="parent"
@@ -125,13 +134,13 @@
                 app:layout_constraintRight_toLeftOf="@id/tv_filter_date"
                 app:layout_constraintTop_toTopOf="parent"
                 binding:clicks="@{click.filterIndustry}"
-                binding:setSelected="@{click.filterIndex == 0}" />
+                binding:setSelected="@{click.filterIndustryFlow}" />
 
             <com.guadou.lib_baselib.font_text_view.TextViewRegular
                 android:id="@+id/tv_filter_date"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@{click.filterIndex == 1? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
+                android:background="@{click.filterDateFlow ? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
                 android:drawableLeft="@drawable/date_black"
                 android:drawablePadding="@dimen/d_9dp"
                 android:paddingLeft="@dimen/d_21dp"
@@ -139,7 +148,7 @@
                 android:paddingRight="@dimen/d_24dp"
                 android:paddingBottom="@dimen/d_9dp"
                 android:text="日期"
-                android:textColor="@{click.filterIndex == 1? @color/white : @color/black}"
+                android:textColor="@{click.filterDateFlow? @color/white : @color/black}"
                 android:textSize="@dimen/d_16sp"
                 app:drawableTint="@color/selector_filter_date"
                 app:layout_constraintBottom_toBottomOf="parent"
@@ -147,13 +156,13 @@
                 app:layout_constraintRight_toLeftOf="@id/tv_filter_option"
                 app:layout_constraintTop_toTopOf="parent"
                 binding:clicks="@{click.filterDate}"
-                binding:setSelected="@{click.filterIndex == 1}" />
+                binding:setSelected="@{click.filterDateFlow}" />
 
             <com.guadou.lib_baselib.font_text_view.TextViewRegular
                 android:id="@+id/tv_filter_option"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@{click.filterIndex == 2? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
+                android:background="@{click.filterOptionFlow ? @drawable/shape_blue_round5 : @drawable/shape_white_round5}"
                 android:drawableLeft="@drawable/part_filterby_white"
                 android:drawablePadding="@dimen/d_10dp"
                 android:paddingLeft="@dimen/d_21dp"
@@ -161,7 +170,7 @@
                 android:paddingRight="@dimen/d_24dp"
                 android:paddingBottom="@dimen/d_9dp"
                 android:text="筛选"
-                android:textColor="@{click.filterIndex == 2? @color/white : @color/black}"
+                android:textColor="@{click.filterOptionFlow ? @color/white : @color/black}"
                 android:textSize="@dimen/d_16sp"
                 app:drawableTint="@color/selector_filter_option"
                 app:layout_constraintBottom_toBottomOf="parent"
@@ -169,7 +178,7 @@
                 app:layout_constraintRight_toRightOf="parent"
                 app:layout_constraintTop_toTopOf="parent"
                 binding:clicks="@{click.filterOption}"
-                binding:setSelected="@{click.filterIndex == 2}" />
+                binding:setSelected="@{click.filterOptionFlow}" />
 
         </androidx.constraintlayout.widget.ConstraintLayout>
 

+ 87 - 0
cpt_parttime/src/main/res/layout/item_part_time_industry.xml

@@ -0,0 +1,87 @@
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:binding="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <data>
+
+        <variable
+            name="item"
+            type="com.hongyegroup.cpt_parttime.bean.IndustryBean" />
+
+    </data>
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        xmlns:tool="http://schemas.android.com/tools"
+        android:id="@+id/root_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_12dp"
+        android:layout_marginTop="@dimen/d_12dp"
+        tool:ignore="MissingConstraints"
+        android:background="@drawable/shape_home_list_border_bg">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            app:layout_constraintDimensionRatio="H,332:280"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent" />
+
+
+        <com.guadou.lib_baselib.font_text_view.TextViewMedium
+            android:id="@+id/tv_industry_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/d_10dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:lines="1"
+            android:shadowColor="@color/black"
+            android:textColor="@color/profile_red"
+            android:textSize="@dimen/d_15sp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toTopOf="@+id/tv_job_num"
+            android:text="商业" />
+
+        <com.guadou.lib_baselib.font_text_view.TextViewRegular
+            android:id="@+id/tv_job_num"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/d_5dp"
+            android:text="47 Jobs"
+            android:textColor="@color/black"
+            android:textSize="14sp"
+            android:visibility="invisible"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_industry_name"
+            app:layout_constraintTop_toBottomOf="@+id/tv_industry_name"
+            app:layout_constraintBottom_toTopOf="@+id/iv_industry_img"
+            />
+
+        <ImageView
+            android:id="@+id/iv_industry_selected"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_margin="@dimen/d_12dp"
+            android:src="@drawable/filter_choose"
+            android:visibility="gone"
+            binding:isVisibleGone="@{item.isSelected}"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <ImageView
+            android:id="@+id/iv_industry_img"
+            android:layout_width="0dp"
+       android:layout_margin="0.5dp"
+            android:layout_height="0dp"
+            android:scaleType="fitXY"
+            binding:imgUrl="@{item.industry_image}"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintDimensionRatio="H,319:163"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent" />
+
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</layout>

+ 2 - 0
cs_baselib/src/main/res/layout/easy_titlebar.xml

@@ -31,6 +31,8 @@
                 android:id="@+id/left_image"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                style="@style/SelectableItemBackgroundLess"
+                android:theme="@style/RippleWhite"
                 android:scaleType="centerInside"
                 android:src="@mipmap/back_black" />
 

+ 148 - 0
cs_baselib/src/main/res/layout/layout_placeholder_grid.xml

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="utf-8"?><!--  Loading  -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tool="http://schemas.android.com/tools"
+    android:id="@+id/ll_placeholder"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/d_15dp"
+        android:layout_marginTop="@dimen/d_11dp"
+        android:layout_marginRight="@dimen/d_15dp"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="140dp"
+            android:layout_marginLeft="@dimen/d_20dp"
+            android:layout_weight="1"
+            android:background="@color/shimmer_background_color" />
+
+    </LinearLayout>
+
+</LinearLayout>

+ 49 - 19
cs_baselib/src/main/res/values/styles.xml

@@ -7,7 +7,7 @@
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
         <item name="android:windowAnimationStyle">@style/my_animation_activity</item>
-<!--        <item name="android:windowBackground">@null</item>-->
+        <!--        <item name="android:windowBackground">@null</item>-->
     </style>
 
     <style name="AppThemeLight" parent="Theme.AppCompat.DayNight.NoActionBar">
@@ -19,6 +19,21 @@
     </style>
 
 
+    <!--全程的Activity跳转动画 统一管理-->
+    <style name="my_animation_activity" mce_bogus="1" parent="@android:style/Animation.Activity">
+        <item name="android:activityOpenEnterAnimation">@anim/open_enter</item>
+        <item name="android:activityOpenExitAnimation">@anim/open_exit</item>
+        <item name="android:activityCloseEnterAnimation">@anim/close_enter</item>
+        <item name="android:activityCloseExitAnimation">@anim/close_exit</item>
+    </style>
+
+
+    <!--上下进出场的activity动画-->
+    <style name="up_down_activity_anim" mce_bogus="1" parent="@android:style/Animation.Activity">
+        <item name="android:activityOpenEnterAnimation">@anim/open_up</item>
+        <item name="android:activityCloseExitAnimation">@anim/close_down</item>
+    </style>
+
     <style name="AppThemeLightDialog" parent="Theme.AppCompat.DayNight.Dialog">
         <!-- Customize your theme here. -->
         <item name="colorPrimary">@color/colorPrimary</item>
@@ -33,7 +48,6 @@
         <item name="android:gravity">center</item>
     </style>
 
-
     <style name="CenterDialog" parent="@android:style/Theme.Dialog">
         <!-- 背景透明,设置圆角对话框必须设置背景透明,否则四角会有背景色小块-->
         <item name="android:windowBackground">@android:color/transparent</item>
@@ -42,24 +56,7 @@
         <!-- 背景模糊 -->
         <item name="android:backgroundDimEnabled">true</item>
         <item name="windowActionBar">false</item>
-
         <item name="android:windowAnimationStyle">@style/loading_dialog_anim</item>
-
-    </style>
-
-    <!--全程的Activity跳转动画 统一管理-->
-    <style name="my_animation_activity" mce_bogus="1" parent="@android:style/Animation.Activity">
-        <item name="android:activityOpenEnterAnimation">@anim/open_enter</item>
-        <item name="android:activityOpenExitAnimation">@anim/open_exit</item>
-        <item name="android:activityCloseEnterAnimation">@anim/close_enter</item>
-        <item name="android:activityCloseExitAnimation">@anim/close_exit</item>
-    </style>
-
-
-    <!--上下进出场的activity动画-->
-    <style name="up_down_activity_anim" mce_bogus="1" parent="@android:style/Animation.Activity">
-        <item name="android:activityOpenEnterAnimation">@anim/open_up</item>
-        <item name="android:activityCloseExitAnimation">@anim/close_down</item>
     </style>
 
 
@@ -122,4 +119,37 @@
     </style>
 
 
+    <!--      按钮波纹效果 ↓     -->
+
+    <!--  点击波纹- 无边界  -->
+    <style name="SelectableItemBackgroundLess">
+        <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
+    </style>
+
+    <!--  点击波纹- 有边界  -->
+    <style name="SelectableItemBackground">
+        <item name="android:background">?attr/selectableItemBackground</item>
+    </style>
+
+    <!--  Spinner下拉箭头颜色   -->
+    <style name="SpnStyle">
+        <item name="android:colorControlNormal">@color/black</item>
+    </style>
+
+    <!--  返回键的圆形波纹效果  -->
+    <!--    control_background_40dp_material.xml-->
+    <!--    control_highlight_material-->
+    <style name="RippleWhite">
+        <item name="android:colorControlHighlight">#D8D8D8</item>
+        <item name="android:radius">20dp</item>
+    </style>
+
+    <!--   自定义Switch样式 -->
+    <style name="scstyle" parent="Theme.AppCompat.Light">
+        <item name="colorControlActivated">#00000000</item>
+        <item name="colorSwitchThumbNormal">#00000000</item>
+        <item name="android:colorForeground">#00000000</item>
+    </style>
+
+
 </resources>

+ 10 - 1
cs_cptServices/src/main/java/com/guadou/cs_cptservices/binding/BaseDataBindingAdapter.kt

@@ -20,7 +20,16 @@ open class BaseDataBindingAdapter<T>(layoutResId: Int, br: Int, list: MutableLis
     }
 
     override fun convert(holder: BaseViewHolder, item: T, payloads: List<Any>) {
-        super.convert(holder, item, payloads)
+        if (item == null) {
+            return
+        }
+
+        holder.getBinding<ViewDataBinding>()?.run {
+            if (_br > 0) {
+                setVariable(_br, item)
+            }
+            executePendingBindings()
+        }
     }
 
     override fun convert(holder: BaseViewHolder, item: T) {

BIN
cs_cptServices/src/main/res/drawable-xhdpi/filter_choose.webp


BIN
cs_cptServices/src/main/res/drawable-xhdpi/filter_unchoose.webp


BIN
cs_cptServices/src/main/res/drawable-xxhdpi/filter_choose.webp


BIN
cs_cptServices/src/main/res/drawable-xxhdpi/filter_unchoose.webp


cs_cptServices/src/main/res/drawable/selector_check_red.xml → cs_cptServices/src/main/res/drawable/selector_check_red_10padding.xml


cs_cptServices/src/main/res/drawable/selector_check_red_square.xml → cs_cptServices/src/main/res/drawable/selector_check_red_big_10padding.xml


+ 9 - 0
cs_cptServices/src/main/res/drawable/selector_check_red_white.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/filter_choose" android:state_checked="true" />
+
+    <item android:drawable="@drawable/filter_unchoose" android:state_checked="false" />
+
+</selector>
+

cs_cptServices/src/main/res/drawable/selector_check_red_circle.xml → cs_cptServices/src/main/res/drawable/selector_radio_red_circle_10padding.xml


+ 0 - 29
cs_cptServices/src/main/res/values/styles.xml

@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <!--  点击波纹- 无边界  -->
-    <style name="SelectableItemBackgroundLess">
-        <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
-    </style>
-
-    <!--  点击波纹- 有边界  -->
-    <style name="SelectableItemBackground">
-        <item name="android:background">?attr/selectableItemBackground</item>
-    </style>
-
-    <!--  Spinner下拉箭头颜色   -->
-    <style name="SpnStyle">
-        <item name="android:colorControlNormal">@color/app_blue</item>
-    </style>
-
-    <!--   自定义Switch样式 -->
-    <style name="scstyle" parent="Theme.AppCompat.Light">
-
-        <item name="colorControlActivated">#00000000</item>
-
-        <item name="colorSwitchThumbNormal">#00000000</item>
-
-        <item name="android:colorForeground">#00000000</item>
-    </style>
-
-</resources>