Releases: Zhuinden/simple-stack
Simple Stack 1.13.0
Simple-Stack 1.13.0 (2018-09-10)
- ADDED: Adds
ScopeKey.Child
interface, which allows the definition of explicit parent hierarchy of a given scope.
Even by default, there is an implicit hierarchy between screens: it is possible to look up services defined by previous keys.
However, there are times when we must define scopes that are supersets of multiple screens. In this case, we know we are on a given screen, within a given state, and we require a superscope to exist that is shared across multiple screens.
In this case, the key can define an explicit parent hierarchy of scopes. These scopes are created before the key's own scope (assuming the key is also a ScopeKey).
The parent scopes are only destroyed after all their children are destroyed.
lookupService()
prefers explicit parents, however will also continue to seek the service across implicit parents, and their explicit parent chain as well.
Simple Stack 1.12.3
Simple Stack 1.12.3 (2018-09-02)
-
CHANGE: When
lookupService
cannot find the service, the exception message is improved (and tells you what could be wrong in your configuration). -
UPDATE:
mvp-view
,mvp-fragments
andmvvm-fragments
samples now useScopedServices
(andBundleable
) to retain presenters/viewmodels across config changes and have their states persisted/restored across process death.
Simple Stack 1.12.2
Simple Stack 1.12.2 (2018-08-29)
-
CHANGE:
AnimatorViewChangeHandler
has an overridable method calledresetPreviousViewValues()
, which receives the previous view after animation is complete. -
CHANGE:
FadeViewChangeHandler
andSegueViewChangeHandler
now resetalpha = 1f
andtranslationX = 0f
respectively, after animation is complete and the view is removed.
Simple Stack 1.12.1
Simple-Stack 1.12.1 (2018-08-28)
- ADDED:
ScopedServices.Activated
. ImplementingActivated
for a scoped service makes the service receive a callback when the scope it is bound to becomes the top-most scope, and when it stops being the top-most scope.
There are strict ordering guarantees that onEnterScope
, onScopeActive
, onScopeInactive
, onExitScope
are called in this order.
onScopeInactive
is called in reverse order (just like onExitScope
).
When navigating from one scope to another scope, the new scope becomes active before the previous scope becomes inactive.
Simple-Stack 1.12.0
Simple-Stack 1.12.0 (2018-08-23)
-
CHANGE:
backstack.top()
andbackstack.root()
now throw exception (just likefromTop()
) if the method is called before a StateChanger is set (and the backstack becomes initialized). This makes usingroot()
/top()
nicer in Kotlin. -
FIX: During a second "initialize" state change (which happens when calling
setStateChanger()
), accessing the Backstack'sgetHistory()
,top()
androot()
inside theStateChanger
could return incorrect value. -
UPDATE: MVP samples are now written in Kotlin. MVVM sample now has a better SQLite-based non-Room reactive wrapper (for people trying out SQLite without Room). Some samples were renamed.
Simple Stack 1.11.7
Simple-Stack 1.11.7 (2018-08-18)
- ADDED:
ServiceBinder.getBackstack()
method. This allows scoped services to be given the backstack as constructor argument.
Simple Stack 1.11.6
Simple-Stack 1.11.6 (2018-08-14)
-
ADDED:
Navigator.hasScope(scopeTag)
,BackstackDelegate.hasScope(scopeTag)
,BackstackManager.hasScope(scopeTag)
. -
ADDED:
Navigator.canFindService(Context, serviceTag)
,BackstackDelegate.canFindService(serviceTag)
,BackstackManager.canFindService(serviceTag)
to check iflookup
can find the service. -
ADDED:
ServiceBinder.lookup()
andServiceBinder.canFind()
to inherit from currently existing scopes while creating service binding. -
CHANGE:
onExitScope(scopeTag)
is now ensured to happen in reverse order compared toonEnterScope(scopeTag)
(both in terms of scope creation order and service binding order).
Simple-Stack 1.11.4
Simple-Stack 1.11.4 (2018-08-10)
-
ADDED:
Navigator.isNavigatorAvailable(Activity)
to ensure the ability to check if the BackstackHost is added to the Activity. -
ADDED:
BackstackManager.lookupService(serviceTag)
,BackstackDelegate.lookupService(serviceTag)
, andNavigator.lookupService(Context, serviceTag)
, which attempts to look up the service in all currently existing scopes (starting from the newest added scope).
Simple-Stack 1.11.2
Simple Stack 1.11.2 (2018-07-26)
-
UPDATE:
state-bundle
is updated to 1.2.1. -
CHANGE: Allow calling
BackstackDelegate.setScopedServices(activity, scopedServices)
once after anonDestroy()
callback (to allow setting back the Activity). -
CHANGE: Allow calling
BackstackDelegate.setScopedServices(null, scopedServices)
. In this case,onDestroy()
will finalize scopes - normally it only does that if Activity is finalizing.
Simple Stack 1.11.1
Simple-Stack 1.11.1 (2018-07-14)
-
API CHANGE:
backstackDelegate.setScopedServices(ScopedServices)
is nowbackstackDelegate.setScopedServices(Activity, ScopedServices)
. -
FIX: If enclosing Activity is destroyed (
onDestroy
) andActivity.isFinishing()
, then the existing scopes are destroyed along with it so thatScoped.onExitScope()
is called properly, and resources are cleaned up as expected across closing the app and restarting it quickly. -
MINOR FIX: Added
ScopedServices
javadoc and missing@NonNull
on ServiceBinder. -
DEPRECATED:
reset()
method. Renamed toforceClear()
. You probably don't need it, but that wasn't clear enough.