android / architecture-samples

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
Apache License 2.0
44.09k stars 11.59k forks source link

[todo-mvvm-live] Not using LiveData<T> #514

Open gregsanborn opened 6 years ago

gregsanborn commented 6 years ago

I was looking for examples of using LiveData class, but it's not here, despite the sample name *-live.

IvorHu commented 6 years ago

There is a TODO tag in TasksRepository class, planing implement it using LiveData.

YassinAJDI commented 6 years ago

How easy to refactor it using LiveData? i'm planning to use it. do i have to replace databinding?

JoseAlcerreca commented 6 years ago

LiveData is designed to be the interface between view and viewmodel. You can use it beyond the vm, but things get complicated so we didn't want to mislead. We're thinking about releasing a standalone sample that showcases LiveData in other layers of the app.