I am working on 1 functionality in which If selects Gender from one Recyclerview itemtype, The other recyclerview itemtype should be gone or set visible according to the flag in model object. Currently I used below approach:
if (genderSelected != genderPreference) {
holder.itemView.visibility = View.GONE
} else {
holder.itemView.visibility = View.VISIBLE
}
With this, the item is Going and again visible leaving white space behind on Gone.
I want it to get removed temporarily without any space.
Thanks in advance.