Android data binding, update a view by another viewmodal's observable -
i have view modal x binded view y.
ex: view y.xml
<variable name="visit" type="pkg.x"></variable>
i have view modal p binded view q.
but view modal's observable controlling behavior of view modal x.
so have define in same layout (y.xml) below
<variable name="visitcard" type="pkg.p"></variable> <variable name="visit" type="pkg.x"></variable>
now want control value in y below.
android:visibility="@{visit.visitstate.equalsignorecase(`calledstate`) && !visitcard.visitstate.equalsignorecase(`noshow`) ? view.visible : view.gone}"
but not working expected. in view modal p, if set visitstate.set('noshow'), doesnt reflect other view-modal x? p.s both of these mvvm added activity fragments. should happen when user interact 1 view based on value, other view should change.
Comments
Post a Comment