# ExploreByTouchHelper

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:customview:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#constants)\|[Ctors](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#)  

# ExploreByTouchHelper

| 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


abstract
class
ExploreByTouchHelper
`  
`


``

extends `[AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat)`


``


`

|---|---|------------------------------------------------|
| java.lang.Object                                     |||
| ↳ | [android.support.v4.view.AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat) ||
|   | ↳ | android.support.v4.widget.ExploreByTouchHelper |

<br />

*** ** * ** ***

ExploreByTouchHelper is a utility class for implementing accessibility support in custom[View](https://developer.android.com/reference/android/view/View.html)s that represent a collection of View-like logical items. It extends[AccessibilityNodeProviderCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat)and simplifies many aspects of providing information to accessibility services and managing accessibility focus.

Clients should override abstract methods on this class and attach it to the host view using[setAccessibilityDelegate(View, AccessibilityDelegateCompat)](https://developer.android.com/reference/android/support/v4/view/ViewCompat#setAccessibilityDelegate(android.view.View, android.support.v4.view.AccessibilityDelegateCompat)):

<br />

```
 class MyCustomView extends View {
     private MyVirtualViewHelper mVirtualViewHelper;

     public MyCustomView(Context context, ...) {
         ...
         mVirtualViewHelper = new MyVirtualViewHelper(this);
         ViewCompat.setAccessibilityDelegate(this, mVirtualViewHelper);
     }

     @Override
     public boolean dispatchHoverEvent(MotionEvent event) {
       return mHelper.dispatchHoverEvent(this, event)
           || super.dispatchHoverEvent(event);
     }

     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
       return mHelper.dispatchKeyEvent(event)
           || super.dispatchKeyEvent(event);
     }

     @Override
     public boolean onFocusChanged(boolean gainFocus, int direction,
         Rect previouslyFocusedRect) {
       super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
       mHelper.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
     }
 }
 mAccessHelper = new MyExploreByTouchHelper(someView);
 ViewCompat.setAccessibilityDelegate(someView, mAccessHelper);
 
```

<br />

## Summary

|                                                                              ### Constants                                                                               ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [HOST_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#HOST_ID) Virtual node identifier value for the host view's node. |
| `int` | [INVALID_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#INVALID_ID) Virtual node identifier value for invalid nodes.  |

|                                                                                                                                                           ### Public constructors                                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ExploreByTouchHelper](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#ExploreByTouchHelper(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` host) ` Constructs a new helper that can expose a virtual view hierarchy for the specified host view. |

|                                                                                                                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                             ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` final boolean`                                                                                                                                    | ` `[clearKeyboardFocusForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#clearKeyboardFocusForVirtualView(int))`(int virtualViewId) ` Attempts to clear keyboard focus from a virtual view.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` final boolean`                                                                                                                                    | ` `[dispatchHoverEvent](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#dispatchHoverEvent(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` Delegates hover events from the host view.                                                                                                                                                                                                                                                                                                                                                                              |
| ` final boolean`                                                                                                                                    | ` `[dispatchKeyEvent](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#dispatchKeyEvent(android.view.KeyEvent))`(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` event) ` Delegates key events from the host view.                                                                                                                                                                                                                                                                                                                                                                                             |
| ` final int`                                                                                                                                        | ` `[getAccessibilityFocusedVirtualViewId](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getAccessibilityFocusedVirtualViewId())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` `[AccessibilityNodeProviderCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat) | ` `[getAccessibilityNodeProvider](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getAccessibilityNodeProvider(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` host) ` Gets the provider for managing a virtual view hierarchy rooted at this View and reported to[AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html)s that explore the window content.                                                                                                                                                                       |
| ` int`                                                                                                                                              | ` `[getFocusedVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getFocusedVirtualView())`() ` *This method was deprecated in API level 24.1.0. Use[getAccessibilityFocusedVirtualViewId()](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getAccessibilityFocusedVirtualViewId()).*                                                                                                                                                                                                                                                                                                         |
| ` final int`                                                                                                                                        | ` `[getKeyboardFocusedVirtualViewId](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getKeyboardFocusedVirtualViewId())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` final void`                                                                                                                                       | ` `[invalidateRoot](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#invalidateRoot())`() ` Notifies the accessibility framework that the properties of the parent view have changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` final void`                                                                                                                                       | ` `[invalidateVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#invalidateVirtualView(int))`(int virtualViewId) ` Notifies the accessibility framework that the properties of a particular item have changed.                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` final void`                                                                                                                                       | ` `[invalidateVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#invalidateVirtualView(int, int))`(int virtualViewId, int changeTypes) ` Notifies the accessibility framework that the properties of a particular item have changed.                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` final void`                                                                                                                                       | ` `[onFocusChanged](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onFocusChanged(boolean, int, android.graphics.Rect))`(boolean gainFocus, int direction, `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` previouslyFocusedRect) ` Delegates focus changes from the host view.                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                                             | ` `[onInitializeAccessibilityEvent](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Initializes an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the the host View which is the event source.                                            |
| ` void`                                                                                                                                             | ` `[onInitializeAccessibilityNodeInfo](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onInitializeAccessibilityNodeInfo(android.view.View, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)` info) ` Initializes an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the host view. |
| ` final boolean`                                                                                                                                    | ` `[requestKeyboardFocusForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#requestKeyboardFocusForVirtualView(int))`(int virtualViewId) ` Attempts to give keyboard focus to a virtual view.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` final boolean`                                                                                                                                    | ` `[sendEventForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#sendEventForVirtualView(int, int))`(int virtualViewId, int eventType) ` Populates an event of the specified type with information about an item and attempts to send it up through the view hierarchy.                                                                                                                                                                                                                                                                                                                                                            |

|                                                                                                                                                                                                                                                                                                   ### Protected methods                                                                                                                                                                                                                                                                                                   ||
|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract int`     | ` `[getVirtualViewAt](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getVirtualViewAt(float, float))`(float x, float y) ` Provides a mapping between view-relative coordinates and logical items.                                                                                                                                                                                                                                                                                                                                                            |
| ` abstract void`    | ` `[getVisibleVirtualViews](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getVisibleVirtualViews(java.util.List<java.lang.Integer>))`(List<Integer> virtualViewIds) ` Populates a list with the view's visible items.                                                                                                                                                                                                                                                                                                                                       |
| ` abstract boolean` | ` `[onPerformActionForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPerformActionForVirtualView(int, int, android.os.Bundle))`(int virtualViewId, int action, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arguments) ` Performs the specified accessibility action on the item associated with the virtual view identifier.                                                                                                                                                                                   |
| ` void`             | ` `[onPopulateEventForHost](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateEventForHost(android.view.accessibility.AccessibilityEvent))`(`[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Populates an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the host view.                                                                                                             |
| ` void`             | ` `[onPopulateEventForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateEventForVirtualView(int, android.view.accessibility.AccessibilityEvent))`(int virtualViewId, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Populates an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the specified item.                                                                  |
| ` void`             | ` `[onPopulateNodeForHost](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForHost(android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))`(`[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)` node) ` Populates an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the host view.                                            |
| ` abstract void`    | ` `[onPopulateNodeForVirtualView](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))`(int virtualViewId, `[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)` node) ` Populates an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the specified item. |
| ` void`             | ` `[onVirtualViewKeyboardFocusChanged](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onVirtualViewKeyboardFocusChanged(int, boolean))`(int virtualViewId, boolean hasFocus) ` Called when the focus state of a virtual view changes.                                                                                                                                                                                                                                                                                                                        |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#)From class` `[android.support.v4.view.AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat)` ` |-----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` boolean`                                                                                                                                          | ` `[dispatchPopulateAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Dispatches an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)to the host[View](https://developer.android.com/reference/android/view/View.html)first and then to its children for adding their text content to the event.                                                                         | | ` `[AccessibilityNodeProviderCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat) | ` `[getAccessibilityNodeProvider](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#getAccessibilityNodeProvider(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` host) ` Gets the provider for managing a virtual view hierarchy rooted at this View and reported to[AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html)s that explore the window content.                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                                                                             | ` `[onInitializeAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Initializes an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the the host View which is the event source.                                                                                                                                                                        | | ` void`                                                                                                                                             | ` `[onInitializeAccessibilityNodeInfo](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#onInitializeAccessibilityNodeInfo(android.view.View, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)` info) ` Initializes an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the host view.                                                                                                                             | | ` void`                                                                                                                                             | ` `[onPopulateAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Gives a chance to the host View to populate the accessibility event with its text content.                                                                                                                                                                                                                                                                                   | | ` boolean`                                                                                                                                          | ` `[onRequestSendAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` host, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Called when a child of the host View has requested sending an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)and gives an opportunity to the parent (the host) to augment the event. | | ` boolean`                                                                                                                                          | ` `[performAccessibilityAction](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#performAccessibilityAction(android.view.View, int, android.os.Bundle))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, int action, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` args) ` Performs the specified accessibility action on the view.                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                                             | ` `[sendAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#sendAccessibilityEvent(android.view.View, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, int eventType) ` Sends an accessibility event of the given type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                                                                             | ` `[sendAccessibilityEventUnchecked](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat#sendAccessibilityEventUnchecked(android.view.View, android.view.accessibility.AccessibilityEvent))`(`[View](https://developer.android.com/reference/android/view/View.html)` host, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` Sends an accessibility event.                                                                                                                                                                                                                                                                                                                                          | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### HOST_ID

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int HOST_ID
```

Virtual node identifier value for the host view's node.

<br />

Constant Value: -1 (0xffffffff)  

### INVALID_ID

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int INVALID_ID
```

Virtual node identifier value for invalid nodes.

<br />

Constant Value: -2147483648 (0x80000000)

## Public constructors

### ExploreByTouchHelper

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ExploreByTouchHelper (View host)
```

Constructs a new helper that can expose a virtual view hierarchy for the specified host view.

<br />

|                                     Parameters                                     ||
|--------|----------------------------------------------------------------------------|
| `host` | `View`: view whose virtual view hierarchy is exposed by this helper <br /> |

## Public methods

### clearKeyboardFocusForVirtualView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean clearKeyboardFocusForVirtualView (int virtualViewId)
```

Attempts to clear keyboard focus from a virtual view.

<br />

|                                              Parameters                                              ||
|-----------------|-------------------------------------------------------------------------------------|
| `virtualViewId` | `int`: the identifier of the virtual view from which to clear keyboard focus <br /> |

|                                   Returns                                   ||
|-----------|------------------------------------------------------------------|
| `boolean` | whether this virtual view actually cleared keyboard focus <br /> |

### dispatchHoverEvent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean dispatchHoverEvent (MotionEvent event)
```

Delegates hover events from the host view.

Dispatches hover[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)s to the virtual view hierarchy when the Explore by Touch feature is enabled.

This method should be called by overriding the host view's[dispatchHoverEvent(MotionEvent)](https://developer.android.com/reference/android/view/View.html#dispatchHoverEvent(android.view.MotionEvent))method:  

```
@Override
 public boolean dispatchHoverEvent(MotionEvent event) {
   return mHelper.dispatchHoverEvent(this, event)
       || super.dispatchHoverEvent(event);
 }
 
```

<br />

<br />

|                                        Parameters                                         ||
|---------|----------------------------------------------------------------------------------|
| `event` | `MotionEvent`: The hover event to dispatch to the virtual view hierarchy. <br /> |

|                        Returns                         ||
|-----------|---------------------------------------------|
| `boolean` | Whether the hover event was handled. <br /> |

### dispatchKeyEvent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean dispatchKeyEvent (KeyEvent event)
```

Delegates key events from the host view.

This method should be called by overriding the host view's[dispatchKeyEvent(KeyEvent)](https://developer.android.com/reference/android/view/View.html#dispatchKeyEvent(android.view.KeyEvent))method:  

```
@Override
 public boolean dispatchKeyEvent(KeyEvent event) {
   return mHelper.dispatchKeyEvent(event)
       || super.dispatchKeyEvent(event);
 }
 
```

<br />

<br />

|         Parameters         ||
|---------|-------------------|
| `event` | `KeyEvent` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getAccessibilityFocusedVirtualViewId

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAccessibilityFocusedVirtualViewId ()
```

<br />

<br />

|                                                                                                                  Returns                                                                                                                  ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the identifier of the virtual view that has accessibility focus or[INVALID_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#INVALID_ID)if no virtual view has accessibility focus <br /> |

### getAccessibilityNodeProvider

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AccessibilityNodeProviderCompat getAccessibilityNodeProvider (View host)
```

Gets the provider for managing a virtual view hierarchy rooted at this View and reported to[AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html)s that explore the window content.

The default implementation behaves as[ViewCompat#getAccessibilityNodeProvider(View)](https://developer.android.com/reference/android/support/v4/view/ViewCompat#getAccessibilityNodeProvider(android.view.View))for the case of no accessibility delegate been set.

<br />

<br />

|      Parameters       ||
|--------|---------------|
| `host` | `View` <br /> |

|                                                                                Returns                                                                                 ||
|--------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|
| [AccessibilityNodeProviderCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat) | The provider. <br /> |

### getFocusedVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getFocusedVirtualView ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Use[getAccessibilityFocusedVirtualViewId()](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#getAccessibilityFocusedVirtualViewId()).

Returns the virtual view ID for the currently accessibility focused item.

<br />

|                                                                                                                  Returns                                                                                                                  ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the identifier of the virtual view that has accessibility focus or[INVALID_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#INVALID_ID)if no virtual view has accessibility focus <br /> |

### getKeyboardFocusedVirtualViewId

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getKeyboardFocusedVirtualViewId ()
```

<br />

<br />

|                                                                                                             Returns                                                                                                             ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the identifier of the virtual view that has keyboard focus or[INVALID_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#INVALID_ID)if no virtual view has keyboard focus <br /> |

### invalidateRoot

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void invalidateRoot ()
```

Notifies the accessibility framework that the properties of the parent view have changed.

You**must**call this method after adding or removing items from the parent view.

<br />

### invalidateVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void invalidateVirtualView (int virtualViewId)
```

Notifies the accessibility framework that the properties of a particular item have changed.

You**must** call this method after changing any of the properties set in[onPopulateNodeForVirtualView(int, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat)).

<br />

|                                                                                                Parameters                                                                                                ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `virtualViewId` | `int`: the virtual view id to invalidate, or[HOST_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#HOST_ID)to invalidate the root view <br /> |

**See also:**

- [invalidateVirtualView(int, int)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#invalidateVirtualView(int, int))  

### invalidateVirtualView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void invalidateVirtualView (int virtualViewId, 
                int changeTypes)
```

Notifies the accessibility framework that the properties of a particular item have changed.

You**must** call this method after changing any of the properties set in[onPopulateNodeForVirtualView(int, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat)).

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                                                                                                                                                                                               ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `virtualViewId` | `int`: the virtual view id to invalidate, or[HOST_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#HOST_ID)to invalidate the root view <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `changeTypes`   | `int`: the bit mask of change types. May be`0`for the default (undefined) change type or one or more of: - [CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat#CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION) - [CONTENT_CHANGE_TYPE_SUBTREE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat#CONTENT_CHANGE_TYPE_SUBTREE) - [CONTENT_CHANGE_TYPE_TEXT](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat#CONTENT_CHANGE_TYPE_TEXT) - [CONTENT_CHANGE_TYPE_UNDEFINED](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat#CONTENT_CHANGE_TYPE_UNDEFINED) <br /> |

### onFocusChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onFocusChanged (boolean gainFocus, 
                int direction, 
                Rect previouslyFocusedRect)
```

Delegates focus changes from the host view.

This method should be called by overriding the host view's[onFocusChanged(boolean, int, Rect)](https://developer.android.com/reference/android/view/View.html#onFocusChanged(boolean, int, android.graphics.Rect))method:  

```
@Override
 public boolean onFocusChanged(boolean gainFocus, int direction,
     Rect previouslyFocusedRect) {
   super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
   mHelper.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
 }
 
```

<br />

<br />

|                Parameters                 ||
|-------------------------|------------------|
| `gainFocus`             | `boolean` <br /> |
| `direction`             | `int` <br />     |
| `previouslyFocusedRect` | `Rect` <br />    |

### onInitializeAccessibilityEvent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onInitializeAccessibilityEvent (View host, 
                AccessibilityEvent event)
```

Initializes an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the the host View which is the event source.

The default implementation behaves as[ViewCompat#onInitalizeAccessibilityEvent(View v, AccessibilityEvent event)](https://developer.android.com/reference/android/support/v4/view/ViewCompat#onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))for the case of no accessibility delegate been set.

<br />

<br />

|                           Parameters                           ||
|---------|-------------------------------------------------------|
| `host`  | `View`: The View hosting the delegate. <br />         |
| `event` | `AccessibilityEvent`: The event to initialize. <br /> |

### onInitializeAccessibilityNodeInfo

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onInitializeAccessibilityNodeInfo (View host, 
                AccessibilityNodeInfoCompat info)
```

Initializes an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the host view.

The default implementation behaves as[ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/view/ViewCompat#onInitializeAccessibilityNodeInfo(android.view.View, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))for the case of no accessibility delegate been set.

<br />

<br />

|                                Parameters                                 ||
|--------|-------------------------------------------------------------------|
| `host` | `View`: The View hosting the delegate. <br />                     |
| `info` | `AccessibilityNodeInfoCompat`: The instance to initialize. <br /> |

### requestKeyboardFocusForVirtualView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean requestKeyboardFocusForVirtualView (int virtualViewId)
```

Attempts to give keyboard focus to a virtual view.

<br />

|                                             Parameters                                             ||
|-----------------|-----------------------------------------------------------------------------------|
| `virtualViewId` | `int`: the identifier of the virtual view on which to place keyboard focus <br /> |

|                                 Returns                                  ||
|-----------|---------------------------------------------------------------|
| `boolean` | whether this virtual view actually took keyboard focus <br /> |

### sendEventForVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean sendEventForVirtualView (int virtualViewId, 
                int eventType)
```

Populates an event of the specified type with information about an item and attempts to send it up through the view hierarchy.

You should call this method after performing a user action that normally fires an accessibility event, such as clicking on an item.

<br />

```
public void performItemClick(T item) {
   ...
   sendEventForVirtualViewId(item.id, AccessibilityEvent.TYPE_VIEW_CLICKED);
 }
 
```

<br />

<br />

|                                          Parameters                                          ||
|-----------------|-----------------------------------------------------------------------------|
| `virtualViewId` | `int`: the identifier of the virtual view for which to send an event <br /> |
| `eventType`     | `int`: the type of event to send <br />                                     |

|                                   Returns                                   ||
|-----------|------------------------------------------------------------------|
| `boolean` | `true`if the event was sent successfully,`false`otherwise <br /> |

## Protected methods

### getVirtualViewAt

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getVirtualViewAt (float x, 
                float y)
```

Provides a mapping between view-relative coordinates and logical items.

<br />

|                     Parameters                      ||
|-----|------------------------------------------------|
| `x` | `float`: The view-relative x coordinate <br /> |
| `y` | `float`: The view-relative y coordinate <br /> |

|                                                                                                                  Returns                                                                                                                   ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | virtual view identifier for the logical item under coordinates (x,y) or[HOST_ID](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#HOST_ID)if there is no item at the given coordinates <br /> |

### getVisibleVirtualViews

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void getVisibleVirtualViews (List<Integer> virtualViewIds)
```

Populates a list with the view's visible items. The ordering of items within`virtualViewIds`specifies order of accessibility focus traversal.

<br />

|                                Parameters                                ||
|------------------|--------------------------------------------------------|
| `virtualViewIds` | `List`: The list to populate with visible items <br /> |

### onPerformActionForVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onPerformActionForVirtualView (int virtualViewId, 
                int action, 
                Bundle arguments)
```

Performs the specified accessibility action on the item associated with the virtual view identifier. See[performAction(int, Bundle)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#performAction(int, android.os.Bundle))for more information.

Implementations**must** handle any actions added manually in[onPopulateNodeForVirtualView(int, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat)).

The helper class automatically handles focus management resulting from[ACTION_ACCESSIBILITY_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_ACCESSIBILITY_FOCUS)and[ACTION_CLEAR_ACCESSIBILITY_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_CLEAR_ACCESSIBILITY_FOCUS)actions.

<br />

|                                              Parameters                                               ||
|-----------------|--------------------------------------------------------------------------------------|
| `virtualViewId` | `int`: The virtual view identifier of the item on which to perform the action <br /> |
| `action`        | `int`: The accessibility action to perform <br />                                    |
| `arguments`     | `Bundle`: (Optional) A bundle with additional arguments, or null <br />              |

|                      Returns                       ||
|-----------|-----------------------------------------|
| `boolean` | true if the action was performed <br /> |

### onPopulateEventForHost

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPopulateEventForHost (AccessibilityEvent event)
```

Populates an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the host view.

The default implementation is a no-op.

<br />

|                                            Parameters                                            ||
|---------|-----------------------------------------------------------------------------------------|
| `event` | `AccessibilityEvent`: the event to populate with information about the host view <br /> |

### onPopulateEventForVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPopulateEventForVirtualView (int virtualViewId, 
                AccessibilityEvent event)
```

Populates an[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)with information about the specified item.

The helper class automatically populates the following fields based on the values set by[onPopulateNodeForVirtualView(int, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat)), but implementations may optionally override them:

- event text, see[getText()](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#getText())
- content description, see[setContentDescription(CharSequence)](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#setContentDescription(java.lang.CharSequence))
- scrollability, see[setScrollable(boolean)](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#setScrollable(boolean))
- password state, see[setPassword(boolean)](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#setPassword(boolean))
- enabled state, see[setEnabled(boolean)](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#setEnabled(boolean))
- checked state, see[setChecked(boolean)](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord.html#setChecked(boolean))

The following required fields are automatically populated by the helper class and may not be overridden:

- item class name, set to the value used in[onPopulateNodeForVirtualView(int, AccessibilityNodeInfoCompat)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateNodeForVirtualView(int, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat))
- package name, set to the package of the host view's[Context](https://developer.android.com/reference/android/content/Context.html), see[setPackageName(CharSequence)](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#setPackageName(java.lang.CharSequence))
- event source, set to the host view and virtual view identifier, see[setSource(AccessibilityRecord, View, int)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityRecordCompat#setSource(android.view.accessibility.AccessibilityRecord, android.view.View, int))

<br />

<br />

|                                           Parameters                                            ||
|-----------------|--------------------------------------------------------------------------------|
| `virtualViewId` | `int`: The virtual view id for the item for which to populate the event <br /> |
| `event`         | `AccessibilityEvent`: The event to populate <br />                             |

### onPopulateNodeForHost

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPopulateNodeForHost (AccessibilityNodeInfoCompat node)
```

Populates an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the host view.

The default implementation is a no-op.

<br />

|                                               Parameters                                                ||
|--------|-------------------------------------------------------------------------------------------------|
| `node` | `AccessibilityNodeInfoCompat`: the node to populate with information about the host view <br /> |

### onPopulateNodeForVirtualView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPopulateNodeForVirtualView (int virtualViewId, 
                AccessibilityNodeInfoCompat node)
```

Populates an[AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)with information about the specified item.

Implementations**must**populate the following required fields:

- event text, see[setText(CharSequence)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setText(java.lang.CharSequence))or[setContentDescription(CharSequence)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setContentDescription(java.lang.CharSequence))
- bounds in parent coordinates, see[setBoundsInParent(Rect)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setBoundsInParent(android.graphics.Rect))

The helper class automatically populates the following fields with default values, but implementations may optionally override them:

- enabled state, set to`true`, see[setEnabled(boolean)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setEnabled(boolean))
- keyboard focusability, set to`true`, see[setFocusable(boolean)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setFocusable(boolean))
- item class name, set to`android.view.View`, see[setClassName(CharSequence)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setClassName(java.lang.CharSequence))

The following required fields are automatically populated by the helper class and may not be overridden:

- package name, identical to the package name set by[onPopulateEventForVirtualView(int, AccessibilityEvent)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateEventForVirtualView(int, android.view.accessibility.AccessibilityEvent)), see[setPackageName(CharSequence)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setPackageName(java.lang.CharSequence))
- node source, identical to the event source set in[onPopulateEventForVirtualView(int, AccessibilityEvent)](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper#onPopulateEventForVirtualView(int, android.view.accessibility.AccessibilityEvent)), see[setSource(View, int)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setSource(android.view.View, int))
- parent view, set to the host view, see[setParent(View)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setParent(android.view.View))
- visibility, computed based on parent-relative bounds, see[setVisibleToUser(boolean)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setVisibleToUser(boolean))
- accessibility focus, computed based on internal helper state, see[setAccessibilityFocused(boolean)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setAccessibilityFocused(boolean))
- keyboard focus, computed based on internal helper state, see[setFocused(boolean)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setFocused(boolean))
- bounds in screen coordinates, computed based on host view bounds, see[setBoundsInScreen(Rect)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#setBoundsInScreen(android.graphics.Rect))

Additionally, the helper class automatically handles keyboard focus and accessibility focus management by adding the appropriate[ACTION_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_FOCUS),[ACTION_CLEAR_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_CLEAR_FOCUS),[ACTION_ACCESSIBILITY_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_ACCESSIBILITY_FOCUS), or[ACTION_CLEAR_ACCESSIBILITY_FOCUS](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat#ACTION_CLEAR_ACCESSIBILITY_FOCUS)actions. Implementations must**never**manually add these actions.

The helper class also automatically modifies parent- and screen-relative bounds to reflect the portion of the item visible within its parent.

<br />

|                                              Parameters                                               ||
|-----------------|--------------------------------------------------------------------------------------|
| `virtualViewId` | `int`: The virtual view identifier of the item for which to populate the node <br /> |
| `node`          | `AccessibilityNodeInfoCompat`: The node to populate <br />                           |

### onVirtualViewKeyboardFocusChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onVirtualViewKeyboardFocusChanged (int virtualViewId, 
                boolean hasFocus)
```

Called when the focus state of a virtual view changes.

<br />

|                                   Parameters                                   ||
|-----------------|---------------------------------------------------------------|
| `virtualViewId` | `int`: the virtual view identifier <br />                     |
| `hasFocus`      | `boolean`:`true`if the view has focus,`false`otherwise <br /> |

-

  ## Interfaces

  - [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)
  - [NestedScrollView.OnScrollChangeListener](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.OnScrollChangeListener)
  - [SimpleCursorAdapter.CursorToStringConverter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.CursorToStringConverter)
  - [SimpleCursorAdapter.ViewBinder](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.ViewBinder)
  - [SlidingPaneLayout.PanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.PanelSlideListener)
  - [SwipeRefreshLayout.OnChildScrollUpCallback](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnChildScrollUpCallback)
  - [SwipeRefreshLayout.OnRefreshListener](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnRefreshListener)
  - [TintableCompoundButton](https://developer.android.com/reference/android/support/v4/widget/TintableCompoundButton)
-

  ## Classes

  - [AutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/AutoScrollHelper)
  - [CircularProgressDrawable](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable)
  - [CompoundButtonCompat](https://developer.android.com/reference/android/support/v4/widget/CompoundButtonCompat)
  - [ContentLoadingProgressBar](https://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar)
  - [CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)
  - [DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)
  - [DrawerLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.LayoutParams)
  - [DrawerLayout.SavedState](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SavedState)
  - [DrawerLayout.SimpleDrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SimpleDrawerListener)
  - [EdgeEffectCompat](https://developer.android.com/reference/android/support/v4/widget/EdgeEffectCompat)
  - [ExploreByTouchHelper](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper)
  - [ImageViewCompat](https://developer.android.com/reference/android/support/v4/widget/ImageViewCompat)
  - [ListPopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/ListPopupWindowCompat)
  - [ListViewAutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/ListViewAutoScrollHelper)
  - [ListViewCompat](https://developer.android.com/reference/android/support/v4/widget/ListViewCompat)
  - [NestedScrollView](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView)
  - [PopupMenuCompat](https://developer.android.com/reference/android/support/v4/widget/PopupMenuCompat)
  - [PopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/PopupWindowCompat)
  - [ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter)
  - [ScrollerCompat](https://developer.android.com/reference/android/support/v4/widget/ScrollerCompat)
  - [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter)
  - [SlidingPaneLayout](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout)
  - [SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.LayoutParams)
  - [SlidingPaneLayout.SimplePanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.SimplePanelSlideListener)
  - [Space](https://developer.android.com/reference/android/support/v4/widget/Space)
  - [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout)
  - [TextViewCompat](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat)
  - [ViewDragHelper](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper)
  - [ViewDragHelper.Callback](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.Callback)