I have parentRecyclerview that includes a nestedRecyclerview. nestedRecyclerView lists several items: (Apple, Banana, Pear). I want to bold the first item (apple) of this nestedRecyclerview like so:
**Apple**
Banana
Pear
-------
Apple
Banana
Pear
-------
Apple
Banana
Pear
I can get it to bold the first item of each nested recyclerview list by doing:
when (position) {
0 ->
// code to make apple bold
}
but that gives me:
**Apple**
Banana
Pear
-------
**Apple**
Banana
Pear
-------
**Appla**
Banana
Pear
How do I go about this? I would add all my code, but honestly it is a ton of code and much more complex that apples, bananas, pears. I prefer code in Kotlin, but I can figure out Java if thats what you know. Thanks!
Lots of internet searching done, but most talk about onClickListener events.
try using this create variable to manage bold of view based on position
and update your parent adapter like this
so in above our
topItemBoldonly true for first item on nested view on first item of parent list