public interface Triad
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Triad.ActivityResultListener |
static interface |
Triad.Callback
Supplied by Triad to the Listener, which is responsible for calling onComplete().
|
static interface |
Triad.Listener<T> |
| Modifier and Type | Method and Description |
|---|---|
void |
backward(Backstack newBackstack)
Replaces the entire backstack with given backstack, in a backward manner.
|
boolean |
canStart(android.content.Intent intent)
Returns whether the given Intent can be launched.
|
void |
forward(Backstack newBackstack)
Replaces the entire backstack with given backstack, in a forward manner.
|
Backstack |
getBackstack() |
boolean |
goBack()
Pops the current screen off the backstack.
|
void |
goTo(Screen<?> screen)
Pushes given Screen onto the backstack.
|
void |
goTo(Screen<?> screen,
TransitionAnimator animator)
Pushes given Screen onto the backstack.
|
boolean |
isTransitioning() |
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Propagates the activity result to the proper [ActivityResultListener].
|
void |
popTo(Screen<?> screen)
Pops the backstack until given Screen is found.
|
void |
popTo(Screen<?> screen,
TransitionAnimator animator)
Pops the backstack until given Screen is found.
|
void |
replace(Backstack newBackstack)
Replaces the entire backstack with given backstack, in a replace manner.
|
void |
replace(Backstack newBackstack,
TransitionAnimator animator)
Replaces the entire backstack with given backstack, in a replace manner.
|
void |
replaceWith(Screen<?> screen)
Replaces the current Screen with given Screen.
|
void |
replaceWith(Screen<?> screen,
TransitionAnimator animator)
Replaces the current Screen with given Screen.
|
void |
setActivity(android.app.Activity activity)
Sets the current Activity, to be able to start other Activities from the Triad instance.
|
void |
setListener(Triad.Listener<?> listener) |
void |
showCurrent()
Forces a notification of the current screen.
|
void |
startActivity(android.content.Intent intent)
Launches the Activity described by given Intent.
|
void |
startActivityForResult(android.content.Intent intent,
Triad.ActivityResultListener listener)
Launches the Activity described by given Intent for result.
|
void |
startWith(Backstack backstack)
Initializes with given backstack.
|
void |
startWith(Screen<?> screen)
Initializes the backstack with given Screen.
|
void |
startWith(Screen<?> screen,
TransitionAnimator animator)
Initializes the backstack with given Screen.
|
@NonNull Backstack getBackstack()
boolean isTransitioning()
void setListener(@Nullable
Triad.Listener<?> listener)
void setActivity(@Nullable
android.app.Activity activity)
void startWith(Screen<?> screen)
screen - The Screen to start with.void startWith(@NonNull
Screen<?> screen,
@Nullable
TransitionAnimator animator)
screen - The Screen to start with.void startWith(@NonNull
Backstack backstack)
void goTo(@NonNull
Screen<?> screen)
screen - The screen to push onto the backstack.void goTo(@NonNull
Screen<?> screen,
@Nullable
TransitionAnimator animator)
screen - The screen to push onto the backstack.void showCurrent()
void popTo(@NonNull
Screen<?> screen)
screen - The Screen to pop to.void popTo(@NonNull
Screen<?> screen,
@Nullable
TransitionAnimator animator)
screen - The Screen to pop to.void replaceWith(@NonNull
Screen<?> screen)
screen - The Screen to replace the current Screen.void replaceWith(@NonNull
Screen<?> screen,
@Nullable
TransitionAnimator animator)
screen - The Screen to replace the current Screen.boolean goBack()
void forward(@NonNull
Backstack newBackstack)
newBackstack - The new backstack.void backward(@NonNull
Backstack newBackstack)
newBackstack - The new backstack.void replace(@NonNull
Backstack newBackstack)
newBackstack - The new backstack.void replace(@NonNull
Backstack newBackstack,
@Nullable
TransitionAnimator animator)
newBackstack - The new backstack.boolean canStart(@NonNull
android.content.Intent intent)
void startActivity(@NonNull
android.content.Intent intent)
intent - The Activity to start.void startActivityForResult(@NonNull
android.content.Intent intent,
@NonNull
Triad.ActivityResultListener listener)
intent - The Activity to start for result.listener - The callback to notify for the result.void onActivityResult(int requestCode,
int resultCode,
@Nullable
android.content.Intent data)
requestCode - The request code, as created by [.startActivityForResult].resultCode - The result code of the returning Activity.data - The result data of the returning Activity.