florina-muntenescu / droidconmvvm Goto Github PK
View Code? Open in Web Editor NEW"Hello, World!" example of the Model-View-ViewModel pattern
"Hello, World!" example of the Model-View-ViewModel pattern
Hi @florina-muntenescu , thanks for this great introduction into MVVM + RxJava world. But I'm wondering now, how it would survive during orientation changes. Assume, we have some long-running background operation, and as your subscribe in onResume()
and unsubscribe in onPause()
, this operation will be interrupted first and then renewed and started again. So what is the right way to not interrupt this operation, but survive during orientation changes?
Thanks in advance.
Hi,
it seems that all actions are executed in the main thread even though the method bind() of the MainActivity states
mSubscription.add(mViewModel.getGreeting()
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setGreeting)
);
Could you confirm or disprove it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.