I need to implement left and right buttons in recycler view. I need to have 3 buttons in left side and right side. Also when say bottons like Pin, Edit etc. Something like below images.
I have implemented this using item decoration of recyclerview
val itemTouchHelper = ItemTouchHelper(swipeController)
itemTouchHelper.attachToRecyclerView(recyclerView)
recyclerView?.addItemDecoration(object : RecyclerView.ItemDecoration() {
override fun onDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State) {
swipeController.onDraw(c)
}
})
When I select favorite in a row that state needs to be saved and when I swipe that particular cell again it should be highlighted to show that it is selected. I am not able to implement this. Please let me know if there is some alternative solution to implement this.
Thanks

