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

DrawerMatchers

public final class DrawerMatchers


Hamcrest matchers for a DrawerLayout.

Summary

Public constructors

Public methods

static Matcher<View>
isClosed(int gravity)

Returns a matcher that verifies that the drawer with the specified gravity is closed.

static Matcher<View>

Returns a matcher that verifies that the drawer (with gravity START) is closed.

static Matcher<View>
isOpen(int gravity)

Returns a matcher that verifies that the drawer with the specified gravity is open.

static Matcher<View>

Returns a matcher that verifies that the drawer (with gravity START) is open.

Public constructors

DrawerMatchers

public final DrawerMatchers()

Public methods

isClosed

public static Matcher<ViewisClosed(int gravity)

Returns a matcher that verifies that the drawer with the specified gravity is closed. Matches only when the drawer is fully closed. Use isOpen instead of not(isClosed())) when you wish to check that the drawer is fully open.

isClosed

public static Matcher<ViewisClosed()

Returns a matcher that verifies that the drawer (with gravity START) is closed. Matches only when the drawer is fully closed. Use isOpen instead of not(isClosed())) when you wish to check that the drawer is fully open.

isOpen

public static Matcher<ViewisOpen(int gravity)

Returns a matcher that verifies that the drawer with the specified gravity is open. Matches only when the drawer is fully open. Use isClosed instead of not(isOpen()) when you wish to check that the drawer is fully closed.

isOpen

public static Matcher<ViewisOpen()

Returns a matcher that verifies that the drawer (with gravity START) is open. Matches only when the drawer is fully open. Use isClosed instead of not(isOpen()) when you wish to check that the drawer is fully closed.