anyone here used `ViewModel` with `AsyncTask` to u...
# android
s
anyone here used
ViewModel
with
AsyncTask
to update UI and handle config-changes?
b
Out of curiosity, why are you using AsyncTask instead of RxJava or LiveData?
s
I dont use RxJava and i havent yet used LiveData
b
If you’re using the
ViewModel
from Architecture Components you should look into using LiveData… it’s not too hard to learn and it will make your life much much easier in the long run (and your code cleaner!)
s
ive been trying to find examples (w/o rx) but theres not a great deal of decent examples that i could find
n
Looks heavy for a small task 😕 There are other approach which seem better (LiveData is the easiest to implement I think)