|
@@ -1,12 +1,12 @@
|
|
|
package com.yingyang.push.adapter
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
-import android.graphics.Typeface
|
|
|
import com.yingyang.push.R
|
|
|
import com.yingyang.push.databinding.ItemPushTypeBinding
|
|
|
import com.yingyang.push.entity.PushMessageTypeBean
|
|
|
import com.yingyangfly.baselib.adapter.BaseDataBindingAdapter
|
|
|
import com.yingyangfly.baselib.ext.setOnSingleClickListener
|
|
|
+import com.yingyangfly.baselib.ext.setTextColorResource
|
|
|
|
|
|
/**
|
|
|
* 推送类型adapter
|
|
@@ -26,12 +26,11 @@ class PushTypeAdapter(override val layoutId: Int = R.layout.item_push_type) :
|
|
|
) {
|
|
|
binding.data = item
|
|
|
if (currentPosition == position) {
|
|
|
- binding.tvType.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
|
|
|
- binding.tvType.setBackgroundResource(R.drawable.selector_push_radio_checked)
|
|
|
+ binding.tvType.setTextColorResource(R.color.color_FF4A76FF)
|
|
|
+ binding.tvType.setBackgroundResource(R.mipmap.icon_train_selected)
|
|
|
} else {
|
|
|
- binding.tvType.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
|
|
|
+ binding.tvType.setTextColorResource(R.color.color_ffffff)
|
|
|
binding.tvType.setBackgroundResource(R.drawable.selector_push_radio_unchecked)
|
|
|
-
|
|
|
}
|
|
|
binding.tvType.setOnSingleClickListener {
|
|
|
currentPosition = position
|