KAbsListView

View with ScrollViewActions and BaseAssertions. Gives access to it's children

See also

Constructors

Link copied to clipboard
public KAbsListView KAbsListView(Function1<ViewBuilder, Unit> builder, Function1<KAdapterItemTypeBuilder, Unit> itemTypeBuilder)

Constructs view class with view interaction from given ViewBuilder

public KAbsListView KAbsListView(Matcher<View> parent, Function1<ViewBuilder, Unit> builder, Function1<KAdapterItemTypeBuilder, Unit> itemTypeBuilder)

Constructs view class with parent and view interaction from given ViewBuilder

public KAbsListView KAbsListView(DataInteraction parent, Function1<ViewBuilder, Unit> builder, Function1<KAdapterItemTypeBuilder, Unit> itemTypeBuilder)

Constructs view class with parent and view interaction from given ViewBuilder

Properties

Link copied to clipboard
private final Map<KClass<? extends KAdapterItem<?>>, KAdapterItemType<KAdapterItem<?>>> itemTypes
Link copied to clipboard
private final Matcher<View> matcher
Link copied to clipboard
private Matcher<Root> root
Link copied to clipboard

Functions

Link copied to clipboard
public Unit act(Function0<ViewAction> function)

Performs custom action on a view

Link copied to clipboard
public Unit assert(Function0<ViewAssertion> function)

Check the view with the given custom assertion

Link copied to clipboard
public final Unit childAt<T extends KAdapterItem<?>>(Integer position, Function1<T, Unit> function)

Performs given actions/assertion on child at given position

Link copied to clipboard
public final Unit children<T extends KAdapterItem<?>>(Function1<T, Unit> function)

Performs given actions/assertion on all children in adapter

Link copied to clipboard
public final T childWith<T extends KAdapterItem<?>>(Function1<DataBuilder, Unit> childMatcher)

Performs given actions/assertion on child that matches given matcher

Link copied to clipboard
public Unit click(CoordinatesProvider location)

Performs click on view

Link copied to clipboard
public Unit doesNotExist()

Checks if the matched view does not exist

Link copied to clipboard
public Unit doubleClick(CoordinatesProvider location)

Performs double click on view

Link copied to clipboard
public final Unit emptyChildAt(Integer position, Function1<KEmptyAdapterItem, Unit> tail)

Calls childAt() on your view with base child

Link copied to clipboard
public final KEmptyAdapterItem emptyChildWith(Function1<DataBuilder, Unit> builder)

Calls childWith() on your view with base child

Link copied to clipboard
public final Unit emptyFirstChild(Function1<KEmptyAdapterItem, Unit> tail)

Calls firstChild() on your view with base child

Link copied to clipboard
public final Unit emptyLastChild(Function1<KEmptyAdapterItem, Unit> tail)

Calls lastChild() on your view with base child

Link copied to clipboard
public final Unit firstChild<T extends KAdapterItem<?>>(Function1<T, Unit> function)

Performs given actions/assertion on first child in adapter

Link copied to clipboard
public final Map<KClass<? extends KAdapterItem<?>>, KAdapterItemType<KAdapterItem<?>>> getItemTypes()
Link copied to clipboard
public final Matcher<View> getMatcher()
Link copied to clipboard
public Matcher<Root> getRoot()
Link copied to clipboard
public Integer getSize()

Returns the size of ScrollView

Link copied to clipboard
Link copied to clipboard
public Unit hasAnyTag(String tags)

Checks if the view has at least one of the given tags

Link copied to clipboard
public Unit hasBackgroundColor(String colorCode)

Checks if the view has given background color

Link copied to clipboard
public Unit hasDescendant(Function1<ViewBuilder, Unit> function)

Checks if the view has given descendant

Link copied to clipboard
public Unit hasNotDescendant(Function1<ViewBuilder, Unit> function)

Checks if the view has not given descendant

Link copied to clipboard
public Unit hasNotSibling(Function1<ViewBuilder, Unit> function)

Checks if the view has not given sibling

Link copied to clipboard
public Unit hasSibling(Function1<ViewBuilder, Unit> function)

Checks if the view has given sibling

Link copied to clipboard
public Unit hasSize(Integer size)

Check size of AbsListView

Link copied to clipboard
public Unit hasTag(String tag)

Checks if the view has given tag

Link copied to clipboard
public Unit inRoot(Function1<RootBuilder, Unit> function)

Check if the view is in given root

Link copied to clipboard
public final Unit invoke(Function1<KAbsListView, Unit> function)

Operator that allows usage of DSL style

Link copied to clipboard
public Unit isActivated()

Checks if the view is activated

Link copied to clipboard

Checks if the view is auto handwriting enabled

Link copied to clipboard
public Unit isClickable()

Checks if the view is clickable

Link copied to clipboard
public Unit isCompletelyAbove(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely above of the view matching the given matcher.

Link copied to clipboard
public Unit isCompletelyBelow(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely below of the view matching the given matcher.

Link copied to clipboard

Checks if the view is completely displayed

Link copied to clipboard
public Unit isCompletelyLeftOf(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely right of the view matching the given matcher.

Link copied to clipboard
public Unit isCompletelyRightOf(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely right of the view matching the given matcher.

Link copied to clipboard
public Unit isDirty()

Checks if the view is dirty

Link copied to clipboard
public Unit isDisabled()

Checks if the view is disabled

Link copied to clipboard
public Unit isDisplayed()

Checks if the view is displayed

Link copied to clipboard
public Unit isEnabled()

Checks if the view is enabled

Link copied to clipboard
public Unit isFocusable()

Checks if the view is focusable

Link copied to clipboard
public Unit isFocused()

Checks if the view is focused

Link copied to clipboard

Checks if the view is force dark allowed

Link copied to clipboard
public Unit isGone()

Checks if the view has GONE visibility

Link copied to clipboard

Checks if the view is haptic feedback enabled

Link copied to clipboard
public Unit isHovered()

Checks if the view is hovered

Link copied to clipboard
public Unit isInvisible()

Checks if the view has INVISIBLE visibility

Link copied to clipboard

Checks if the view is not clickable

Link copied to clipboard

Checks if the view is not completely displayed

Link copied to clipboard

Checks if the view is not displayed

Link copied to clipboard

Checks if the view is not focusable

Link copied to clipboard
public Unit isNotFocused()

Checks if the view is not focused

Link copied to clipboard

Checks if the view is not selected

Link copied to clipboard
public Unit isSelected()

Checks if the view is selected

Link copied to clipboard
public Unit isVisible()

Checks if the view has VISIBLE visibility

Link copied to clipboard
public final Unit lastChild<T extends KAdapterItem<?>>(Function1<T, Unit> function)

Performs given actions/assertion on last child in adapter

Link copied to clipboard
public Unit longClick(CoordinatesProvider location)

Performs long click on view

Link copied to clipboard
public Unit matches(Function1<ViewBuilder, Unit> function)

Check if the view matches given matcher

Link copied to clipboard
public Unit notMatches(Function1<ViewBuilder, Unit> function)

Check if the view does not match given matcher

Link copied to clipboard
public Unit onFailure(Function2<Throwable, Matcher<View>, Unit> function)

Adds failure handler to the view

Link copied to clipboard
public final KAbsListView perform(Function1<KAbsListView, Unit> function)

Infix function for invoking lambda on your view

Link copied to clipboard

Presses IME action, if supported view is in focus

Link copied to clipboard
public Unit repeatUntil(Integer maxAttempts, Function0<ViewAction> action, Function1<ViewBuilder, Unit> matcher)

Repeats given action on the view until this view will match the given matcher

Link copied to clipboard
public Unit scrollTo()

Scrolls to the view, if possible

public Unit scrollTo(Integer position)

Scrolls to the specific position of the view

Link copied to clipboard
public Unit scrollToEnd()

Scrolls to the last position of the view

Link copied to clipboard

Scrolls to the starting position of the view

Link copied to clipboard
public Unit setRoot(Matcher<Root> root)
Link copied to clipboard
public Unit swipeDown()

Swipes down on the view

Link copied to clipboard
public Unit swipeLeft()

Swipes left on the view

Link copied to clipboard
public Unit swipeRight()

Swipes right on the view

Link copied to clipboard
public Unit swipeUp()

Swipes up on the view