Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/view/ViewTreeObserver.OnTouchModeChangeListener#pubmethods)

# ViewTreeObserver.OnTouchModeChangeListener

*** ** * ** ***

` public static interface ViewTreeObserver.OnTouchModeChangeListener `   
` `

|---|
| android.view.ViewTreeObserver.OnTouchModeChangeListener |

Known indirect subclasses [AbsListView](https://developer.android.com/reference/android/widget/AbsListView), [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView), [GridView](https://developer.android.com/reference/android/widget/GridView), [ListView](https://developer.android.com/reference/android/widget/ListView), [TabHost](https://developer.android.com/reference/android/widget/TabHost) [AbsListView](https://developer.android.com/reference/android/widget/AbsListView) Base class that can be used to implement virtualized lists of items. [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView) A view that shows items in a vertically scrolling two-level list. [GridView](https://developer.android.com/reference/android/widget/GridView) A view that shows items in two-dimensional scrolling grid. [ListView](https://developer.android.com/reference/android/widget/ListView) Displays a vertically-scrollable collection of views, where each view is positioned immediately below the previous view in the list.
[TabHost](https://developer.android.com/reference/android/widget/TabHost) *This class was deprecated in API level 30. new applications should use fragment APIs instead of this class: Use [TabLayout and ViewPager](https://developer.android.com/guide/navigation/navigation-swipe-view) instead.*   

*** ** * ** ***

Interface definition for a callback to be invoked when the touch mode changes.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/view/ViewTreeObserver.OnTouchModeChangeListener#onTouchModeChanged(boolean)(boolean isInTouchMode) ` Callback method to be invoked when the touch mode changes. |

## Public methods

### onTouchModeChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onTouchModeChanged (boolean isInTouchMode)
```

Callback method to be invoked when the touch mode changes.

<br />

| Parameters ||
|---|---|
| `isInTouchMode` | `boolean`: True if the view hierarchy is now in touch mode, false otherwise. <br /> |