filtersKt


public final class filtersKt


Summary

Public methods

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element's metadata tag contains the given value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has a child matching the given matcher.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has the specific Clickable attached.

static final @NonNull LayoutElementMatcher
hasColor(@ColorInt int argb)

Returns a LayoutElementMatcher which checks whether the element is drawn with the given color.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element's content description matches the given pattern.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element's content description contains the given value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has a descendant matches the given matcher.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has the given height value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has the given height value.

static final @NonNull LayoutElementMatcher
hasImage(@NonNull String protolayoutResId)

Returns a LayoutElementMatcher which checks whether the element displays an image with the given protolayout resource id.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element's text equals the given value.

static final @NonNull LayoutElementMatcher
hasText(@NonNull String value, boolean subString, boolean ignoreCase)

Returns a LayoutElementMatcher which checks whether the element's text contains the given value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has the given width value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element has the given width value.

static final @NonNull LayoutElementMatcher

Returns a LayoutElementMatcher which checks whether the element is clickable.

Public methods

public static final @NonNull LayoutElementMatcher containsTag(@NonNull String value)

Returns a LayoutElementMatcher which checks whether the element's metadata tag contains the given value.

public static final @NonNull LayoutElementMatcher hasChild(@NonNull LayoutElementMatcher matcher)

Returns a LayoutElementMatcher which checks whether the element has a child matching the given matcher.

public static final @NonNull LayoutElementMatcher hasClickable(@NonNull ModifiersBuilders.Clickable clickable)

Returns a LayoutElementMatcher which checks whether the element has the specific Clickable attached.

public static final @NonNull LayoutElementMatcher hasColor(@ColorInt int argb)

Returns a LayoutElementMatcher which checks whether the element is drawn with the given color.

public static final @NonNull LayoutElementMatcher hasContentDescription(@NonNull Regex pattern)

Returns a LayoutElementMatcher which checks whether the element's content description matches the given pattern.

Parameters
@NonNull Regex pattern

String pattern to match with content description.

public static final @NonNull LayoutElementMatcher hasContentDescription(@NonNull String value)

Returns a LayoutElementMatcher which checks whether the element's content description contains the given value.

Parameters
@NonNull String value

Value to match with content description.

public static final @NonNull LayoutElementMatcher hasDescendant(@NonNull LayoutElementMatcher matcher)

Returns a LayoutElementMatcher which checks whether the element has a descendant matches the given matcher.

public static final @NonNull LayoutElementMatcher hasHeight(@NonNull DimensionBuilders.ContainerDimension height)

Returns a LayoutElementMatcher which checks whether the element has the given height value.

public static final @NonNull LayoutElementMatcher hasHeight(@NonNull DimensionBuilders.ProportionalDimensionProp height)

Returns a LayoutElementMatcher which checks whether the element has the given height value.

public static final @NonNull LayoutElementMatcher hasImage(@NonNull String protolayoutResId)

Returns a LayoutElementMatcher which checks whether the element displays an image with the given protolayout resource id.

Parameters
@NonNull String protolayoutResId

The resource id of the image, which should be a protolayout resource id instead of android resource id.

public static final @NonNull LayoutElementMatcher hasText(@NonNull TypeBuilders.StringProp value)

Returns a LayoutElementMatcher which checks whether the element's text equals the given value.

public static final @NonNull LayoutElementMatcher hasText(@NonNull String value, boolean subString, boolean ignoreCase)

Returns a LayoutElementMatcher which checks whether the element's text contains the given value.

Note that this only checks the static content of the element's text.

public static final @NonNull LayoutElementMatcher hasWidth(@NonNull DimensionBuilders.ContainerDimension width)

Returns a LayoutElementMatcher which checks whether the element has the given width value.

public static final @NonNull LayoutElementMatcher hasWidth(@NonNull DimensionBuilders.ProportionalDimensionProp width)

Returns a LayoutElementMatcher which checks whether the element has the given width value.

public static final @NonNull LayoutElementMatcher isClickable()

Returns a LayoutElementMatcher which checks whether the element is clickable.