When to use Android’s LiveData and Observable field?
问题 I’m implementing a MVVM and data-binding and I’m trying to understand when should I use Observable field over LiveData? I already run through different documentations and discovered that LiveData is lifecycle aware, but in sample codes in Github these two are being used in ViewModel at the same time. So, I’m confused if LiveData is better than Observable field, why not just use LiveData at all? 回答1: Both have their use-cases, for instance: If you want a life-cycle tolerant container for your