Merge remote-tracking branch 'origin/master'

dev
xufulong 3 years ago
commit 6ad0556e8f
  1. 6
      app/src/main/java/com/frank/ffmpeg/adapter/HorizontalAdapter.kt

@ -3,7 +3,6 @@ package com.frank.ffmpeg.adapter
import android.graphics.Color import android.graphics.Color
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
@ -36,11 +35,10 @@ class HorizontalAdapter(private val itemList: List<String>?) : RecyclerView.Adap
if (onItemClickListener != null) { if (onItemClickListener != null) {
okViewHolder.btnSelect.setOnClickListener { okViewHolder.btnSelect.setOnClickListener {
notifyItemChanged(lastClickPosition) notifyItemChanged(lastClickPosition)
Log.i("onBindViewHolder", "lastClickPosition=$lastClickPosition")
//select the current color //select the current color
okViewHolder.btnSelect.setTextColor(Color.BLUE) okViewHolder.btnSelect.setTextColor(Color.BLUE)
onItemClickListener!!.onItemClick(okViewHolder.adapterPosition) onItemClickListener!!.onItemClick(okViewHolder.absoluteAdapterPosition)
lastClickPosition = okViewHolder.adapterPosition lastClickPosition = okViewHolder.absoluteAdapterPosition
} }
} }
} }

Loading…
Cancel
Save