# CoordinatorLayout.DefaultBehavior

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:coordinatorlayout:28.0.0-alpha1  
Deprecated since version 27.1.0  
Summary:[Methods](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior#)  

# CoordinatorLayout.DefaultBehavior

| 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
static

abstract
@interface
CoordinatorLayout.DefaultBehavior
`  
`


implements

Annotation


`

|-----------------------------------------------------------------|
| android.support.design.widget.CoordinatorLayout.DefaultBehavior |

<br />

*** ** * ** ***

<br />

**This @interface was deprecated in API level 27.1.0.**   
Use[CoordinatorLayout.AttachedBehavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.AttachedBehavior)instead

Defines the default[CoordinatorLayout.Behavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior)of a[View](https://developer.android.com/reference/android/view/View.html)class.

When writing a custom view, use this annotation to define the default behavior when used as a direct child of an[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout). The default behavior can be overridden using[setBehavior(CoordinatorLayout.Behavior)](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.LayoutParams#setBehavior(android.support.design.widget.CoordinatorLayout.Behavior)).

Example:`@DefaultBehavior(MyBehavior.class)`

<br />

## Summary

|                                                                                                                          ### Public methods                                                                                                                          ||
|------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| ` Class<? extends `[Behavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior)`>` | ` `[value](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior#value())`() ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior#)From interface` java.lang.annotation.Annotation ` |-----------------------------------------|-------------------------| | ` abstract Class<? extends Annotation>` | ` annotationType() `    | | ` abstract boolean`                     | ` equals(Object arg0) ` | | ` abstract int`                         | ` hashCode() `          | | ` abstract String`                      | ` toString() `          | ||

## Public methods

### value

```
Class<? extends Behavior> value ()
```

<br />

<br />

|                                                                  Returns                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------------------|--------|
| `Class<? extends `[Behavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior)`>` | <br /> |

-

  ## Annotations

  - [CoordinatorLayout.DefaultBehavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.DefaultBehavior)
-

  ## Interfaces

  - [CoordinatorLayout.AttachedBehavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.AttachedBehavior)
-

  ## Classes

  - [CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout)
  - [CoordinatorLayout.Behavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior)
  - [CoordinatorLayout.LayoutParams](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.LayoutParams)
  - [CoordinatorLayout.SavedState](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.SavedState)