|
@@ -12,6 +12,7 @@ import com.yingyangfly.baselib.adapter.BaseDataBindingAdapter
|
|
|
import com.yingyangfly.baselib.db.DoctorBean
|
|
|
import com.yingyangfly.baselib.ext.getEndAnimation
|
|
|
import com.yingyangfly.baselib.ext.getScaleAnimation
|
|
|
+import com.yingyangfly.baselib.ext.setOnSingleClickListener
|
|
|
|
|
|
/**
|
|
|
* 推荐医生adapter
|
|
@@ -43,27 +44,7 @@ class RecommendDoctorAdapter(override val layoutId: Int = R.layout.item_recommen
|
|
|
)
|
|
|
binding.tvConsult.text = spannableString
|
|
|
|
|
|
- binding.doctorLayour.setOnTouchListener { v, event ->
|
|
|
- when (event.action) {
|
|
|
- MotionEvent.ACTION_DOWN -> {
|
|
|
- if (v.id == R.id.doctorLayour) {
|
|
|
- v.startAnimation(getScaleAnimation())
|
|
|
- }
|
|
|
- }
|
|
|
- MotionEvent.ACTION_UP -> {
|
|
|
- if (v.id == R.id.doctorLayour) {
|
|
|
- v.startAnimation(getEndAnimation())
|
|
|
- onClickListener?.invoke(item, "doctor")
|
|
|
- }
|
|
|
- }
|
|
|
- MotionEvent.ACTION_CANCEL -> {
|
|
|
- if (v.id == R.id.doctorLayour) {
|
|
|
- v.startAnimation(getEndAnimation())
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- true
|
|
|
- }
|
|
|
+ binding.doctorLayour.setOnSingleClickListener { onClickListener?.invoke(item, "doctor") }
|
|
|
|
|
|
binding.btnConsultation.setOnTouchListener { v, event ->
|
|
|
when (event.action) {
|