databinding for rescue
# anko
a
databinding for rescue
a
xml? or do you mean something else?
a
no, I mean bind data to views on the spot. This eliminates need of storing its references to local variables
for example
Copy code
textView {
rxJavaObservable.subcsribe(this::setText)
}
a
can you do this for recyclerview ?
a
you mean in ViewHolder?
a
yes, viewholder + recycling
a
yes, why not
a
i’m not sure how though, because the recyclerview gets it’s updates through notify* methods
I mean you need to somehow populate the viewholder first
a
view gets a set of observables and subscribes to it. That's all. Then you push data to that observables from your recycler view adapter
a
have you ever tried doing that ?
a
I'm using such approach for a long time. The implementation is a bit tricky and dirty to share it here