# SearchView

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/search/SearchView.java)

*** ** * ** ***


```
public class SearchView
```

<br />

*** ** * ** ***

Layout that provides a full screen search view and can be used with `https://developer.android.com/reference/com/google/android/material/search/SearchBar`.

The example below shows how to use the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` and `https://developer.android.com/reference/com/google/android/material/search/SearchView` together:

```
<androidx.coordinatorlayout.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

  <!-- NestedScrollingChild goes here (NestedScrollView, RecyclerView, etc.). -->
  <androidx.core.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/searchbar_scrolling_view_behavior">
    <!-- Screen content goes here. -->
  </androidx.core.widget.NestedScrollView>

  <com.google.android.material.appbar.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">
    <com.google.android.material.search.SearchBar
        android:id="@+id/search_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/searchbar_hint" />
  </com.google.android.material.appbar.AppBarLayout>

  <com.google.android.material.search.SearchView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:hint="@string/searchbar_hint"
      app:layout_anchor="@id/search_bar">
    <!-- Search suggestions/results go here (ScrollView, RecyclerView, etc.). -->
  </com.google.android.material.search.SearchView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
```

For more information, see the [component developer guidance](https://github.com/material-components/material-components-android/blob/master/docs/components/Search.md) and [design guidelines](https://material.io/components/search/overview).

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/com/google/android/material/search/SearchView.Behavior` Behavior that sets up an `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`. |
| `public interface https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionListener` Callback interface that provides important transition events for a `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `public enum https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionState` Enum that defines the possible transition states of an `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |

| ### Public fields |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionState` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#currentTransitionState()` |
| `final EditText` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#editText()` |
| `final TextView` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#searchPrefix()` |
| `int` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#softInputMode()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/search/SearchView#SearchView(Context)(Context context)` |
| `https://developer.android.com/reference/com/google/android/material/search/SearchView#SearchView(Context,AttributeSet)(Context context, AttributeSet attrs)` |
| `https://developer.android.com/reference/com/google/android/material/search/SearchView#SearchView(Context,AttributeSet,int)(Context context, AttributeSet attrs, int defStyleAttr)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#addHeaderView(View)(View headerView)` Add a header view to this `https://developer.android.com/reference/com/google/android/material/search/SearchView`, which will be placed above the search text area. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#addTransitionListener(com.google.android.material.search.SearchView.TransitionListener)( https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionListener transitionListener )` Adds a listener to handle `https://developer.android.com/reference/com/google/android/material/search/SearchView` transitions such as showing and closing. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#addView(View,int,ViewGroup.LayoutParams)(View child, int index, LayoutParams params)` |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#cancelBackProgress()()` Call this method from onBackCancelled or handleOnBackCancelled so that the back handler can cancel the back animation. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#clearFocusAndHideKeyboard()()` Clears focus on the main EditText and hides the soft keyboard. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#clearText()()` Clears the text of main EditText. |
| `Behavior<SearchView>` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getBehavior()()` |
| `https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionState` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getCurrentTransitionState()()` Returns the current `https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionState` for this `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `EditText` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getEditText()()` Returns the main EditText which can be used for hint and search text. |
| `https://developer.android.com/reference/java/lang/CharSequence` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getHint()()` Returns the hint of main EditText. |
| `View` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getSearchContainer()()` Returns the container view containing the non-scrim content of the `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `TextView` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getSearchPrefix()()` Returns the search prefix TextView, which appears before the main EditText. |
| `https://developer.android.com/reference/java/lang/CharSequence` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getSearchPrefixText()()` Returns the search prefix text. |
| `int` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getSoftInputMode()()` Returns the current value of this `https://developer.android.com/reference/com/google/android/material/search/SearchView`'s soft input mode. |
| `Editable` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getText()()` Returns the text of main EditText, which usually represents the search text. |
| `Toolbar` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#getToolbar()()` Returns the Toolbar used by the `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#handleBackInvoked()()` Call this method from onBackInvoked or handleOnBackPressed so that the back handler can complete the back animation, or handle back without progress in certain cases. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#hide()()` Hides the `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an animation. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#inflateMenu(int)(int menuResId)` Inflate a menu to provide additional options. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#isAnimatedNavigationIcon()()` Returns whether the navigation icon should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#isAutoShowKeyboard()()` Returns whether the soft keyboard should be shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is shown. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#isMenuItemsAnimated()()` Returns whether the menu items should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#isSetupWithSearchBar()()` Returns whether or not this `https://developer.android.com/reference/com/google/android/material/search/SearchView` is set up with an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#isShowing()()` Returns whether the `https://developer.android.com/reference/com/google/android/material/search/SearchView`'s main content view is shown or showing. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#removeAllHeaderViews()()` Remove all header views from the section above the search text area. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#removeHeaderView(View)(View headerView)` Remove a header view from the section above the search text area. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#removeTransitionListener(com.google.android.material.search.SearchView.TransitionListener)( https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionListener transitionListener )` Removes a listener to handle `https://developer.android.com/reference/com/google/android/material/search/SearchView` transitions such as showing and closing. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#requestFocusAndShowKeyboard()()` Requests focus on the main EditText and shows the soft keyboard. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setAnimatedNavigationIcon(boolean)(boolean animatedNavigationIcon)` Sets whether the navigation icon should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setAutoShowKeyboard(boolean)(boolean autoShowKeyboard)` Sets whether the soft keyboard should be shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is shown. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setElevation(float)(float elevation)` |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setHint(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence hint)` Sets the hint of main EditText. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setHint(int)(int hintResId)` Sets the hint of main EditText. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setMenuItemsAnimated(boolean)(boolean menuItemsAnimated)` Sets whether the menu items should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setModalForAccessibility(boolean)(boolean isSearchViewModal)` Sets whether the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is modal for accessibility, i.e., whether views that are not nested within the `https://developer.android.com/reference/com/google/android/material/search/SearchView` are important for accessibility. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setOnMenuItemClickListener(OnMenuItemClickListener)( OnMenuItemClickListener onMenuItemClickListener )` Set a listener to handle menu item clicks. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setSearchPrefixText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence searchPrefixText)` Sets the search prefix text. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text)` Sets the text of main EditText. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setText(int)(int textResId)` Sets the text of main EditText. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setToolbarTouchscreenBlocksFocus(boolean)(boolean touchscreenBlocksFocus)` Sets the 'touchscreenBlocksFocus' attribute of the nested toolbar. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setVisible(boolean)(boolean visible)` Updates the visibility of the `https://developer.android.com/reference/com/google/android/material/search/SearchView` without an animation. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#setupWithSearchBar(com.google.android.material.search.SearchBar)(https://developer.android.com/reference/com/google/android/material/search/SearchBar searchBar)` Sets up this `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`, which will result in the `https://developer.android.com/reference/com/google/android/material/search/SearchView` being shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` is clicked. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#show()()` Shows the `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an animation. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#startBackProgress(BackEventCompat)(BackEventCompat backEvent)` Call this method from onBackStarted or handleOnBackStarted so that the back handler can initialize and start animating. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#updateBackProgress(BackEventCompat)(BackEventCompat backEvent)` Call this method from onBackProgressed or handleOnBackProgressed so that the back handler can continue animating with a new progress value. |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#updateSoftInputMode()()` Sets the soft input mode for this `https://developer.android.com/reference/com/google/android/material/search/SearchView`. |

| ### Protected methods |
|---|---|
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#onAttachedToWindow()()` |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#onDetachedFromWindow()()` |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#onFinishInflate()()` |
| `void` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#onRestoreInstanceState(Parcelable)(Parcelable state)` |
| `Parcelable` | `https://developer.android.com/reference/com/google/android/material/search/SearchView#onSaveInstanceState()()` |

## Public fields

### currentTransitionState

```
public SearchView.TransitionState currentTransitionState
```

### editText

```
public final EditText editText
```

### searchPrefix

```
public final TextView searchPrefix
```

### softInputMode

```
public int softInputMode
```

## Public constructors

### SearchView

```
public SearchView(Context context)
```

### SearchView

```
public SearchView(Context context, AttributeSet attrs)
```

### SearchView

```
public SearchView(Context context, AttributeSet attrs, int defStyleAttr)
```

## Public methods

### addHeaderView

```
public void addHeaderView(View headerView)
```

Add a header view to this `https://developer.android.com/reference/com/google/android/material/search/SearchView`, which will be placed above the search text area.

Note: due to complications with the expand/collapse animation, a header view is intended to be used with a standalone `https://developer.android.com/reference/com/google/android/material/search/SearchView` which slides up/down instead of morphing from an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`.

### addTransitionListener

```
public void addTransitionListener(
    SearchView.TransitionListener transitionListener
)
```

Adds a listener to handle `https://developer.android.com/reference/com/google/android/material/search/SearchView` transitions such as showing and closing.

### addView

```
public void addView(View child, int index, LayoutParams params)
```

### cancelBackProgress

```
public void cancelBackProgress()
```

Call this method from onBackCancelled or handleOnBackCancelled so that the back handler can cancel the back animation.

### clearFocusAndHideKeyboard

```
public void clearFocusAndHideKeyboard()
```

Clears focus on the main EditText and hides the soft keyboard.

### clearText

```
public void clearText()
```

Clears the text of main EditText.

### getBehavior

```
public Behavior<SearchView> getBehavior()
```

### getCurrentTransitionState

```
public SearchView.TransitionState getCurrentTransitionState()
```

Returns the current `https://developer.android.com/reference/com/google/android/material/search/SearchView.TransitionState` for this `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### getEditText

```
public EditText getEditText()
```

Returns the main EditText which can be used for hint and search text.

### getHint

```
public CharSequence getHint()
```

Returns the hint of main EditText.

### getSearchContainer

```
public View getSearchContainer()
```

Returns the container view containing the non-scrim content of the `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### getSearchPrefix

```
public TextView getSearchPrefix()
```

Returns the search prefix TextView, which appears before the main EditText.

### getSearchPrefixText

```
public CharSequence getSearchPrefixText()
```

Returns the search prefix text.

### getSoftInputMode

```
public int getSoftInputMode()
```

Returns the current value of this `https://developer.android.com/reference/com/google/android/material/search/SearchView`'s soft input mode.

### getText

```
public Editable getText()
```

Returns the text of main EditText, which usually represents the search text.

### getToolbar

```
public Toolbar getToolbar()
```

Returns the Toolbar used by the `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### handleBackInvoked

```
public void handleBackInvoked()
```

Call this method from onBackInvoked or handleOnBackPressed so that the back handler can complete the back animation, or handle back without progress in certain cases.

### hide

```
public void hide()
```

Hides the `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an animation.

Note: the hide animation will not be started if the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is currently hidden or hiding.

### inflateMenu

```
public void inflateMenu(int menuResId)
```

Inflate a menu to provide additional options.

### isAnimatedNavigationIcon

```
public boolean isAnimatedNavigationIcon()
```

Returns whether the navigation icon should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### isAutoShowKeyboard

```
public boolean isAutoShowKeyboard()
```

Returns whether the soft keyboard should be shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is shown.

### isMenuItemsAnimated

```
public boolean isMenuItemsAnimated()
```

Returns whether the menu items should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### isSetupWithSearchBar

```
public boolean isSetupWithSearchBar()
```

Returns whether or not this `https://developer.android.com/reference/com/google/android/material/search/SearchView` is set up with an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`.

### isShowing

```
public boolean isShowing()
```

Returns whether the `https://developer.android.com/reference/com/google/android/material/search/SearchView`'s main content view is shown or showing.

### removeAllHeaderViews

```
public void removeAllHeaderViews()
```

Remove all header views from the section above the search text area.

### removeHeaderView

```
public void removeHeaderView(View headerView)
```

Remove a header view from the section above the search text area.

### removeTransitionListener

```
public void removeTransitionListener(
    SearchView.TransitionListener transitionListener
)
```

Removes a listener to handle `https://developer.android.com/reference/com/google/android/material/search/SearchView` transitions such as showing and closing.

### requestFocusAndShowKeyboard

```
public void requestFocusAndShowKeyboard()
```

Requests focus on the main EditText and shows the soft keyboard.

### setAnimatedNavigationIcon

```
public void setAnimatedNavigationIcon(boolean animatedNavigationIcon)
```

Sets whether the navigation icon should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### setAutoShowKeyboard

```
public void setAutoShowKeyboard(boolean autoShowKeyboard)
```

Sets whether the soft keyboard should be shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is shown.

### setElevation

```
public void setElevation(float elevation)
```

### setHint

```
public void setHint(CharSequence hint)
```

Sets the hint of main EditText.

### setHint

```
public void setHint(int hintResId)
```

Sets the hint of main EditText.

### setMenuItemsAnimated

```
public void setMenuItemsAnimated(boolean menuItemsAnimated)
```

Sets whether the menu items should be animated from the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` to `https://developer.android.com/reference/com/google/android/material/search/SearchView`.

### setModalForAccessibility

```
public void setModalForAccessibility(boolean isSearchViewModal)
```

Sets whether the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is modal for accessibility, i.e., whether views that are not nested within the `https://developer.android.com/reference/com/google/android/material/search/SearchView` are important for accessibility.

### setOnMenuItemClickListener

```
public void setOnMenuItemClickListener(
    OnMenuItemClickListener onMenuItemClickListener
)
```

Set a listener to handle menu item clicks.

### setSearchPrefixText

```
public void setSearchPrefixText(CharSequence searchPrefixText)
```

Sets the search prefix text.

### setText

```
public void setText(CharSequence text)
```

Sets the text of main EditText.

### setText

```
public void setText(int textResId)
```

Sets the text of main EditText.

### setToolbarTouchscreenBlocksFocus

```
public void setToolbarTouchscreenBlocksFocus(boolean touchscreenBlocksFocus)
```

Sets the 'touchscreenBlocksFocus' attribute of the nested toolbar. This is set to 'false' by default, which allows keyboard navigation between the search view toolbar and the search results.

### setVisible

```
public void setVisible(boolean visible)
```

Updates the visibility of the `https://developer.android.com/reference/com/google/android/material/search/SearchView` without an animation.

### setupWithSearchBar

```
public void setupWithSearchBar(SearchBar searchBar)
```

Sets up this `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an `https://developer.android.com/reference/com/google/android/material/search/SearchBar`, which will result in the `https://developer.android.com/reference/com/google/android/material/search/SearchView` being shown when the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` is clicked. This behavior will be set up automatically if the `https://developer.android.com/reference/com/google/android/material/search/SearchBar` and `https://developer.android.com/reference/com/google/android/material/search/SearchView` are in a CoordinatorLayout and the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is anchored to the `https://developer.android.com/reference/com/google/android/material/search/SearchBar`.

### show

```
public void show()
```

Shows the `https://developer.android.com/reference/com/google/android/material/search/SearchView` with an animation.

Note: the show animation will not be started if the `https://developer.android.com/reference/com/google/android/material/search/SearchView` is currently shown or showing.

### startBackProgress

```
public void startBackProgress(BackEventCompat backEvent)
```

Call this method from onBackStarted or handleOnBackStarted so that the back handler can initialize and start animating.

Note that this must be called prior to calling `https://developer.android.com/reference/com/google/android/material/motion/MaterialBackHandler#updateBackProgress(BackEventCompat)`.

### updateBackProgress

```
public void updateBackProgress(BackEventCompat backEvent)
```

Call this method from onBackProgressed or handleOnBackProgressed so that the back handler can continue animating with a new progress value.

### updateSoftInputMode

```
public void updateSoftInputMode()
```

Sets the soft input mode for this `https://developer.android.com/reference/com/google/android/material/search/SearchView`. This is important because the `https://developer.android.com/reference/com/google/android/material/search/SearchView` will use this to determine whether the keyboard should be shown/hidden at the same time as the expand/collapse animation, or if the keyboard should be staggered with the animation to avoid glitchiness due to a resize of the screen. This will be set automatically by the `https://developer.android.com/reference/com/google/android/material/search/SearchView` during initial render but make sure to invoke this if you are changing the soft input mode at runtime.

## Protected methods

### onAttachedToWindow

```
protected void onAttachedToWindow()
```

### onDetachedFromWindow

```
protected void onDetachedFromWindow()
```

### onFinishInflate

```
protected void onFinishInflate()
```

### onRestoreInstanceState

```
protected void onRestoreInstanceState(Parcelable state)
```

### onSaveInstanceState

```
protected Parcelable onSaveInstanceState()
```