Closed qbait closed 5 years ago
this isn't really related to epoxy or mvrx.
For Recyclerview in general you could use addOnLayoutChangeListener
and addOnChildAttachStateChangeListener
with epoxy you can use EpoxyController#addModelBuildListener
but that will be after recyclerview is notified of changes and before it is laid out, so you would have to wait for it to lay itself out
Thanks again @elihart
I use IdleHandler to fix my problem :)
Looper.myQueue().addIdleHandler {
// do something
false
}
I'm using
MvRx
and I'm defining myCarousel
I want to perform an action on this
Carousel
after creating it so I added it inOnViewCreated
. However, at this point myrecyclerView.childCount
is 0. I added ugly delay by now.Is there a better solution to this problem?