|
|
@ -35,13 +35,13 @@ class HistoryKeyAdapter(activity: SearchActivity, val callBack: CallBack) : |
|
|
|
override fun registerListener(holder: ItemViewHolder, binding: ItemFilletTextBinding) { |
|
|
|
override fun registerListener(holder: ItemViewHolder, binding: ItemFilletTextBinding) { |
|
|
|
holder.itemView.apply { |
|
|
|
holder.itemView.apply { |
|
|
|
setOnClickListener { |
|
|
|
setOnClickListener { |
|
|
|
getItem(holder.layoutPosition)?.let { |
|
|
|
getItemByLayoutPosition(holder.layoutPosition)?.let { |
|
|
|
callBack.searchHistory(it.word) |
|
|
|
callBack.searchHistory(it.word) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
onLongClick { |
|
|
|
onLongClick { |
|
|
|
explosionField.explode(this, true) |
|
|
|
explosionField.explode(this, true) |
|
|
|
getItem(holder.layoutPosition)?.let { |
|
|
|
getItemByLayoutPosition(holder.layoutPosition)?.let { |
|
|
|
callBack.deleteHistory(it) |
|
|
|
callBack.deleteHistory(it) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|