Comments (2)
Now I saw that LifecycleObserver's methods can receive the LifecycleOwner that generated the lifecycle event. Looks like the scenario of multiple observed lifecycles was considered.
I think that it can be possible to hold a mapping from LifecycleOwner to its respective callback, and use this information in lifecycle methods.
However, it is just my guess. Since it looks like this scenario was at least considered, it would be best to see how the authors intended this to work...
from codelab-android-lifecycles.
Stackoverflow might be a better forum. This one is for issues with the codelabs.
from codelab-android-lifecycles.
Related Issues (20)
- Cancel Timer HOT 3
- ChronoActivity2 Does Not Exist HOT 3
- The EVENT class needs to be refactored to Event HOT 1
- fatal: Could not read from remote repository
- Your code is not working
- Step3 : LifecycleRegistryOwner was deplicated HOT 2
- LiveDataTimerViewModel Example. No need for canceling timer? HOT 1
- Steps 6 StateLifecyle HOT 2
- Is there a Kotlin version of this somewhere?
- step6 can not work HOT 4
- Cannot clone repository. HOT 1
- FAILURE: Build failed with an exception HOT 2
- Where do the lifecycle-aware components remove the observer which I added before? HOT 1
- If you find errors in the codelab steps or the code
- SavedStateHandle not work in my phone
- Crash: LifecycleRegistry#removeObserver ConcurrentModificationException
- Provide https url instead of ssh to clone the project
- Rotating screen does not reset timer
- Cannot even run the app...
- @OnLifecycleEvent deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codelab-android-lifecycles.