View.OnLongClickListener
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
View.OnLongClickListener
android.view.View.OnLongClickListener
|
Known indirect subclasses
ZoomButton |
This class was deprecated
in API level 26.
Use other means to handle this functionality. This widget is merely a
simple wrapper around a long-press handler.
|
|
Interface definition for a callback to be invoked when a view has been clicked and held.
Summary
Public methods
onLongClick
public abstract boolean onLongClick (View v)
Called when a view has been clicked and held.
Parameters |
v |
View : The view that was clicked and held. |
Returns |
boolean |
true if the callback consumed the long click, false otherwise. |
onLongClickUseDefaultHapticFeedback
public boolean onLongClickUseDefaultHapticFeedback (View v)
Returns whether the default HapticFeedbackConstants.LONG_PRESS
haptic feedback
is performed when this listener has consumed the long click. This method is called
immediately after onLongClick(View)
has returned true.
Parameters |
v |
View : The view that was clicked and held.
This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]