Skip to content

Instantly share code, notes, and snippets.

@MwBakker
Created December 6, 2019 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MwBakker/225312b8d35c0336e8dc003e6da9dad8 to your computer and use it in GitHub Desktop.
Save MwBakker/225312b8d35c0336e8dc003e6da9dad8 to your computer and use it in GitHub Desktop.
public ObservableField<Integer> total = new ObservableField<>();
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{total}"/>
<!-- I am used to have a viewModel for each class, so in such case it would be something like android:text="@{orderViewModel.total} but in your case I think @{total} is the right way -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment