[Solved] How to get the total count in cart using Recyclerview Adapter


use cartlist.size() for total count.
and for using in activity define this in Adapter class:

class ProductAdapter(private val..
{
...
fun getCartSize():Int {
return cartlist.size()
}
...
}

and in the activity you can use :

adapter.getCartsize()

2

solved How to get the total count in cart using Recyclerview Adapter