-
- All Implemented Interfaces:
-
io.github.kakaocup.kakao.screen.ScreenActions
public class Screen<T extends Screen<T>> implements ScreenActions
Container class for UI elements.
This class groups UI elements and grants access to basic actions, such as tapBack() and closeSoftKeyboard()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classScreen.Companion
-
Field Summary
Fields Modifier and Type Field Description private final ViewInteractionDelegateviewprivate KBaseView<?>rootView
-
Constructor Summary
Constructors Constructor Description Screen()
-
Method Summary
Modifier and Type Method Description ViewInteractionDelegategetView()KBaseView<?>getRootView()The visibility of rootView will be checked when entering the screen UnitsetRootView(KBaseView<?> rootView)The visibility of rootView will be checked when entering the screen final Unitintercept(Function1<Interceptor.Configurator, Unit> configurator)Sets the interceptors for the screen. final Unitreset()Removes the interceptors from the screen. final Unitinvoke(Function1<T, Unit> function)Operator that allows usage of DSL style -
-
Method Detail
-
getView
ViewInteractionDelegate getView()
-
getRootView
KBaseView<?> getRootView()
The visibility of rootView will be checked when entering the screen
-
setRootView
Unit setRootView(KBaseView<?> rootView)
The visibility of rootView will be checked when entering the screen
-
intercept
final Unit intercept(Function1<Interceptor.Configurator, Unit> configurator)
Sets the interceptors for the screen. Interceptors will be invoked on all interactions while the screen is active.
The screen is considered
activewhen it is invoked in one of the following ways:val screen = SomeScreen() screen { // Active view { click() } ... } // Inactive // OR onScreen<SomeScreen>() { // Active view { click() } ... } // InactiveIf you use nesting screens, all interceptors of the screens that became active will be invoked in LIFO order (using Deque).
- Parameters:
configurator- Configuration of the interceptors
-
-
-
-