Skip to content

Most visited

Recently visited

navigation

DrawerMatchers

public final class DrawerMatchers
extends Object

java.lang.Object
   ↳ android.support.test.espresso.contrib.DrawerMatchers


Hamcrest matchers for a DrawerLayout.

Summary

Public methods

static Matcher<View> isClosed()

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

static Matcher<View> isClosed(int gravity)

Returns a matcher that verifies that the drawer with the specified gravity 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> isOpen()

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

Inherited methods

From class java.lang.Object

Public methods

isClosed

Matcher<View> isClosed ()

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.

Returns
Matcher<View>

isClosed

Matcher<View> isClosed (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(int) instead of not(isClosed())) when you wish to check that the drawer is fully open.

Parameters
gravity int
Returns
Matcher<View>

isOpen

Matcher<View> isOpen (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(int) instead of not(isOpen()) when you wish to check that the drawer is fully closed.

Parameters
gravity int
Returns
Matcher<View>

isOpen

Matcher<View> isOpen ()

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.

Returns
Matcher<View>
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.