Releases: Zhuinden/simple-stack
Releases · Zhuinden/simple-stack
Simple Stack 0.9.5
Simple Stack 0.9.5 (2017-02-13)
- INTERNAL CHANGE:
clearStatesNotIn()
now receives bothkeyStateMap
andStateChange
, instead of just the new state. - ENHANCEMENT: Added
HistoryBuilder.from(Backstack)
andHistoryBuilder.from(BackstackDelegate)
convenience methods. - ENHANCEMENT: Added
HistoryBuilder.isEmpty()
method, and implementsIterable<Parcelable>
. - ADDED:
flow-masterdetail-fragments
example. - FIX: A bug in
flow-masterdetail
sample that prevented Master's state from being persisted if detail directly opens a detail.
Simple Stack 0.9.3
Simple Stack 0.9.3 (2017-02-12)
- ENHANCEMENT: Added ability to force execute pending state changes with
Backstack.executePendingStateChange()
. - INTERNAL CHANGE:
BackstackDelegate.onDestroy()
callsbackstack.executePendingStateChange()
to prevent hanging state changes. - ADDED:
ObjectAnimator
-based segue animation to MVP example.
Simple Stack 0.9.2
Simple Stack 0.9.2 (2017-02-11)
- BREAKING CHANGE(?):
CompletionListener
no longer receivesisPending
parameter. - ADDED:
Backstack.isStateChangePending()
to replaceisPending
. - ENHANCEMENT: Added some missing
@NonNull
and@Nullable
annotations. - ADDED: Apache license notes, and improved the README.
Simple Stack 0.9.1
Simple Stack 0.9.1 (2017-02-09)
- _BREAKING CHANGE(!)_:
BackstackDelegate
has a new method which must be called:backstackDelegate.onDestroy()
Not callingbackstackDelegate.onDestroy()
will most likely result in memory leak, so please make sure you call it paired withonCreate()
. - BREAKING CHANGE:
BackstackDelegate.clearStatesNotIn()
is no longer public, because it is automatically managed on state change completion. - ENHANCEMENT: Added
Backstack.CompletionListener
which listens to when backstack has completed a state change.
AddedBackstack.addCompletionListener()
andBackstack.removeCompletionListener()
methods.
The backstack keeps a strong reference to your completion listener, so make sure you remove your change listener when no longer needed. - ENHANCEMENT: It is no longer the responsibility of the
StateChanger
to callbackstackDelegate.clearStatesNotIn()
.
TheBackstackDelegate
registers itself as aCompletionListener
, and therefore it can callclearStatesNotIn()
automatically. - ENHANCEMENT: Added
flow-sample
changed to use Simple-Stack, as namesimple-stack-flow-masterdetail
.
Simple Stack 0.8.3
Simple Stack 0.8.3 (2017-02-04)
- ENHANCEMENT: Added
BackstackDelegate.setPersistenceTag(String)
for support of multiple backstacks. If used, it must be called beforeBackstackDelegate.onCreate()
.
Simple Stack 0.8.2
Simple Stack 0.8.2 (2017-02-03)
- CHANGE:
KeyContextWrapper
is public again - ENHANCEMENT: Created
fragments
example based onmvp
example.
Simple Stack 0.8.1
Simple Stack 0.8.1 (2017-02-02)
- BREAKING(?) CHANGE: Renamed
HistoryBuilder.peek()
toHistoryBuilder.getLast()
- ENHANCEMENT: Added the following new methods to
HistoryBuilder
:HistoryBuilder.get(index)
,HistoryBuilder.contains(key)
,HistoryBuilder.containsAll(keys)
,HistoryBuilder.add(key, index)
,HistoryBuilder.size()
,HistoryBuilder.removeAt(index)
,HistoryBuilder.remove(key)
,HistoryBuilder.clear()
,HistoryBuilder.retainAll(keys)
,HistoryBuilder.indexOf(key)
Simple Stack 0.8.0
Simple Stack 0.8.0 (2017-02-02)
- BREAKING CHANGE: Removed
StateChange.Direction
, it is now anint
annotated with@IntDef
.
This means thatStateChange.Direction.FORWARD
is nowStateChange.FORWARD
, same forBACKWARD
andREPLACE
. - Fix:
@StateChangerRegisterMode
shouldn't have been public
Simple Stack 0.7.0
Simple Stack 0.7.0 (2017-01-31)
- BREAKING CHANGE: Removed
Backstack.get(Context)
,BackstackDelegate.isSystemService(String)
andBackstackDelegate.getSystemService(Context)
.
These can be easily done manually with the following setup:
public static Backstack get(Context context) {
// noinspection ResourceType
return (Backstack)context.getSystemService(BACKSTACK);
}
and
@Override
public Object getSystemService(String name) {
if(name.equals(BACKSTACK)) {
return backstackDelegate.getBackstack();
}
return super.getSystemService(name);
}
Therefore the preferred solution is to provide the Backstack
instance via @Inject
instead of Backstack.get(Context)
.
Example for Backstack.get(Context)
was moved to simple-stack-example
as BackstackService
.
Example for @Inject Backstack backstack;
is seen in simple-stack-example-mvp
.
Simple Stack 0.6.1
Simple Stack 0.6.1 (2017-01-27)
- It is now allowed to initialize
BackstackDelegate
without aStateChanger
, in which casesetStateChanger()
must be called beforeonPostResume()
.This way it is possible to postpone the initialization state change of the
Backstack`. - Added MVP sample.