lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

belongs to Maven artifact androidx.recyclerview:recyclerview-selection:1.0.0-alpha3

OnItemActivatedListener

public interface OnItemActivatedListener

androidx.recyclerview.selection.OnItemActivatedListener<K>


Register an OnItemActivatedListener to be notified when an item is activated (tapped or double clicked).

Summary

Public methods

abstract boolean onItemActivated(ItemDetails<K> item, MotionEvent e)

Called when an item is "activated".

Public methods

onItemActivated

public abstract boolean onItemActivated (ItemDetails<K> item, 
                MotionEvent e)

Called when an item is "activated". An item is activated, for example, when no selection exists and the user taps an item with her finger, or double clicks an item with a pointing device like a Mouse.

Parameters
item ItemDetails: details of the item.

e MotionEvent: the event associated with item.

Returns
boolean true if the event was handled.