class ReorderViewHolder(val binding: AdapterReorderBinding,
                        val dragStartListener : OnStartDragListener? = null)
    : RecyclerView.ViewHolder(binding.root) {

    fun setData(data: ItemModel) {
        itemView.apply {
            binding.tvAdapter.text = data.title

            binding.imReorder?.setOnTouchListener(View.OnTouchListener { v, event ->
                if (MotionEventCompat.getActionMasked(event) == MotionEvent.ACTION_DOWN) {
                    dragStartListener?.onStartDrag(this@ReorderViewHolder)
                }
                false
            })

        }
    }

}