Added getter for spring looper#64
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
|
Usually I avoid this problem by cleaning up springs when the view they are associated with is detached from the window. Is there a reason this approach won't work for you? |
|
I typically use a Model-View-Presenter style or one where the logic is Handling construction in a nearly Singleton style inside of Subscription Changes to the available Loopers to allow for binding to the Activity would On Sat, Aug 8, 2015 at 2:00 AM, Will Bailey notifications@github.com
|
|
I see your point about making the Android Looper more friendly toward Activity/Fragment lifecycle. What if we take an approach similar to RxAndroid and provide a way to bind a SpringSystem to an Activity/Fragment context. You'd then automatically get the pausing behavior your looking for without exposing the internals of the SpringSystem. I'd like to see this added to Rebound. Are you interested in working on something like this? |
|
Sadly I need to get an application into Facebook and other companies before
I can presently afford the time to contribute #startuplife. My quick and
dirty solution was to extend BaseSpringSystem slightly differently.
|
Straightforward use case:
Use to pause springs that shouldn't be running when Activity is paused. Simply use onPause and onResume from Activity lifecycle to calls start/stop on looper. No more tears.