# LayoutMatchers

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#)  

# LayoutMatchers

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
LayoutMatchers
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.matcher.LayoutMatchers |

<br />

*** ** * ** ***

A collection of hamcrest matches to detect typical layout issues.

## Summary

|                                                                                                                                      ### Public methods                                                                                                                                      ||
|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`>` | ` `[hasEllipsizedText](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#hasEllipsizedText())`() ` Matches TextView elements having ellipsized text. |
| ` static Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`>` | ` `[hasMultilineText](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#hasMultilineText())`() ` Matches TextView elements having multiline text.    |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### hasEllipsizedText

```
Matcher<View> hasEllipsizedText ()
```

Matches TextView elements having ellipsized text. If text is too long to fit into a TextView, it can be either ellipsized ('Too long' shown as 'Too l...' or '... long') or cut off ('Too long' shown as 'Too l'). Though acceptable in some cases, usually indicates bad user experience.

<br />

|                                           Returns                                           ||
|-------------------------------------------------------------------------------------|--------|
| `Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`>` | <br /> |

### hasMultilineText

```
Matcher<View> hasMultilineText ()
```

Matches TextView elements having multiline text.

<br />

|                                           Returns                                           ||
|-------------------------------------------------------------------------------------|--------|
| `Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`>` | <br /> |

-

  ## Classes

  - [BoundedMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/BoundedMatcher)
  - [CursorMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/CursorMatchers)
  - [CursorMatchers.CursorMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/CursorMatchers.CursorMatcher)
  - [HasBackgroundMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/HasBackgroundMatcher)
  - [LayoutMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers)
  - [PreferenceMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/PreferenceMatchers)
  - [RootMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers)
  - [ViewMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/ViewMatchers)
-

  ## Enums

  - [ViewMatchers.Visibility](https://developer.android.com/reference/android/support/test/espresso/matcher/ViewMatchers.Visibility)