Android Data Binding issue with Android Annotations

Author: keehooCreated Jul 24, 2019Updated Mar 30, 2020
LabelsEnhancement

Hi, An activity is annotated with @DataBound. I create my view model in at the end of @Injected and start my network call, which changes the value of LiveData in doOnSubsribe and onSuccess/onError

I set this ViewModel as the data in Binding. in initGUI with binding.setViewModel(model)

Expected. The view should observer the live data when I declare such in xml. for instance: bind:visibility="@{viewModel.isLoading}

Observed behaviors: The live data changes correctly, the setValue method is called, but view does not react on those changes.

AndroidAnnotations version: 4.6

Android compile SDK version: 28

Source: androidannotations/androidannotations