Releases: Zhuinden/simple-stack
Simple Stack 1.6.3
Simple Stack 1.6.3 (2017-06-28)
- Added missing
@NonNull
and@Nullable
annotations. - Added kotlin example.
- Added new basic examples.
Simple Stack 1.6.2
Simple Stack 1.6.2 (2017-05-14)
-
MINOR CHANGE:
DefaultStateChanger
no longer explicitly demands aStateKey
, because bothLayoutInflationStrategy
andGetViewChangeHandlerStrategy
can be re-defined for custom behavior. -
Added
GetViewChangeHandlerStrategy
toDefaultStateChanger
to allow re-defining the view change handler behavior. -
Added
ContextCreationStrategy
toDefaultStateChanger
to support Mortar scopes, or anything similar in design. -
Added
BackstackManager.StateChangeCompletionListener
to add a hook where you can listen for the completion of state changes reliably - even if they were forced to execute.
Also added addStateChangeCompletionListener
to BackstackDelegate
and Navigator.Installer
accordingly.
Please make sure it does not retain a reference to enclosing Activity, to avoid memory leaks.
-
Minor fix:
setKeyFilter()
,setKeyParceler()
, andsetStateClearStrategy()
inBackstackDelegate
now throw if they are set after callingonCreate()
, as per docs. -
Bump
state-bundle
version to1.1.5
-
ADDED:
simple-stack-mortar-sample
, which is based onmortar-sample
fromsquare/mortar
, but usingSimple-Stack
andService-Tree
.
Simple Stack 1.6.1
Simple Stack 1.6.1 (2017-05-08)
- Added
GetPreviousViewStrategy
toDefaultStateChanger
as per request (#36).
Simple Stack 1.6.0
Simple Stack 1.6.0 (2017-05-03)
- Added
KeyFilter
to allow clearing out keys on process death that should not be restored. - Added
stateChange.backstack()
which returns the backstack this state change was executed by. - Added
DefaultStateChanger.ViewChangeStartListener
for before the view change, but after the state restore - Added
DefaultStateChanger.LayoutInflationStrategy
to support asynchronous layout inflation (if you need it) or hopefully Anko
Simple Stack 1.5.3
Simple Stack 1.5.3 (2017-04-22)
- Bump
state-bundle
to 1.1.4
Simple Stack 1.5.2
Simple Stack 1.5.2 (2017-04-12)
state-bundle
updated to1.1.0
Simple Stack 1.5.1
Simple Stack 1.5.1 (2017-04-07)
- Added a method to
DefaultStateChanger
to allow perform view change with an externally specified direction.
Simple Stack 1.5.0
Simple Stack 1.5.0 (2017-04-07)
-
Merged
zhuinden/navigator
intozhuinden/simple-stack
. -
ADDED:
Navigator
class as an optional replacement forBackstackDelegate
(API 11+).
BackstackDelegate
had a lot of callbacks to remember (onPause()
, onResume()
, onRetainCustomNonConfigurationInstance()
, onDestroy()
),
but more importantly you had to manage saving out the current view's state in onSaveInstanceState()
manually.
With Navigator, this is all hidden in the BackstackHost
installed by Navigator.install()
(or Navigator.configure()...install()
, so this problem is solved for you.
- ADDED:
DefaultStateChanger
that by default usesNavigator
-based installation.
To use DefaultStateChanger
with BackstackDelegate
, you must provide DefaultStateChanger.configure().setStatePersistenceStrategy()
and delegate persistence calls to your delegate.
-
ADDED:
StateKey
interface used byDefaultStateChanger
. -
ADDED: default view change handlers for
DefaultStateChanger
. -
All examples (except the
fragment
andmultistack
samples) were updated to useNavigator
. -
simple-stack-example-mvp
no longer usessquare/coordinator
, it uses custom viewgroups instead.
This is because Coordinator
gets created only after container.addView()
, which makes it hard to work with.
Simple Stack 1.4.4
Simple Stack 1.4.4 (2017-03-28)
- ADDED:
backstack.top()
method that returnsnull
or the last element in the backstack
Simple Stack 1.4.3
Simple Stack 1.4.3 (2017-03-25)
- FIX: Fixed a bug that if a restored backstack is cleared and an initialize state change is triggered,
then the restored keys were used instead of the initial key
(this only surfaced if you attempt to use multiple backstacks, and a cleared backstack is re-used)