# Openable

Artifact: [androidx.customview:customview](https://developer.android.com/jetpack/androidx/releases/customview) [View Source](https://cs.android.com/search?q=file:androidx/customview/widget/Openable.java+class:androidx.customview.widget.Openable) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/customview#1.1.0)

*** ** * ** ***


```
public interface Openable
```

<br />

Known direct subclasses [DrawerLayout](https://developer.android.com/reference/androidx/drawerlayout/widget/DrawerLayout), [SlidingPaneLayout](https://developer.android.com/reference/androidx/slidingpanelayout/widget/SlidingPaneLayout)

|---|---|
| `https://developer.android.com/reference/androidx/drawerlayout/widget/DrawerLayout` | DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from one or both vertical edges of the window. |
| `https://developer.android.com/reference/androidx/slidingpanelayout/widget/SlidingPaneLayout` | SlidingPaneLayout provides a horizontal, multi-pane layout for use at the top level of a UI. |

*** ** * ** ***

A layout that has two states: opened and closed.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/customview/widget/Openable#close()()` Move the layout to the closed state. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/customview/widget/Openable#isOpen()()` Check if the layout is currently in the opened state. |
| `abstract void` | `https://developer.android.com/reference/androidx/customview/widget/Openable#open()()` Move the layout to the opened state. |

## Public methods

### close

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/customview#1.1.0)

```
abstract void close()
```

Move the layout to the closed state.

### isOpen

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/customview#1.1.0)

```
abstract boolean isOpen()
```

Check if the layout is currently in the opened state.

| Returns |
|---|---|
| `boolean` | true if the layout's state is considered opened. |

### open

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/customview#1.1.0)

```
abstract void open()
```

Move the layout to the opened state.