Stay organized with collections Save and categorize content based on your preferences.

LayoutAssertions

public final class LayoutAssertions


A collection of layout ViewAssertions.

Summary

Public constructors

Public methods

static ViewAssertion

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

static ViewAssertion

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

static ViewAssertion

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

static ViewAssertion
noOverlaps(Matcher<View> selector)

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

Public constructors

LayoutAssertions

public LayoutAssertions()

Public methods

noEllipsizedText

public static ViewAssertion noEllipsizedText()

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

noMultilineButtons

public static ViewAssertion noMultilineButtons()

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

noOverlaps

public static ViewAssertion noOverlaps()

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

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

noOverlaps

public static ViewAssertion noOverlaps(Matcher<View> selector)

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

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