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.