{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LayoutAssertions

class LayoutAssertions


A collection of layout ViewAssertions.

Summary

Public constructors

Public functions

java-static ViewAssertion!

Returns a ViewAssertion that asserts that view hierarchy does not contain ellipsized or cut off text views.

java-static ViewAssertion!

Returns a ViewAssertion that asserts that view hierarchy does not contain multiline buttons.

java-static ViewAssertion!
noOverlaps(selector: Matcher<View!>!)

Returns a ViewAssertion that asserts that descendant views matching the selector do not overlap each other.

java-static ViewAssertion!

Returns a ViewAssertion that asserts that descendant objects assignable to TextView or ImageView do not overlap each other.

Public constructors

LayoutAssertions

LayoutAssertions()

Public functions

noEllipsizedText

java-static fun noEllipsizedText(): ViewAssertion!

Returns a ViewAssertion that asserts that view hierarchy does not contain ellipsized or cut off text views.

noMultilineButtons

java-static fun noMultilineButtons(): ViewAssertion!

Returns a ViewAssertion that asserts that view hierarchy does not contain multiline buttons.

noOverlaps

java-static fun noOverlaps(selector: Matcher<View!>!): ViewAssertion!

Returns a ViewAssertion that asserts that descendant views matching the selector do not overlap each other.

Example: onView(rootView).check(noOverlaps(isAssignableFrom(TextView.class));

noOverlaps

java-static fun noOverlaps(): ViewAssertion!

Returns a ViewAssertion that asserts that descendant objects assignable to TextView or ImageView do not overlap each other.

Example: onView(rootView).check(noOverlaps());