Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
  
  
View.OnClickListener
  public
  static
  
  
  interface
  View.OnClickListener
  
  
  
  
    
    | android.view.View.OnClickListener | 
  
  
  
    
      | 
          Known indirect subclasses
          
  
  
    
  
  
    
      
        | CharacterPickerDialog | Dialog for choosing accented characters related to a base character. |  
        | KeyboardView | This class was deprecated
      in API level 29.
    This class is deprecated because this is just a convenient UI widget class that
             application developers can re-implement on top of existing public APIs.  If you have
             already depended on this class, consider copying the implementation from AOSP into
             your project or re-implementing a similar widget by yourselves |  
        | QuickContactBadge | Widget used to show an image with the standard QuickContact badge
 and on-click behavior. |  | 
  
    
  Interface definition for a callback to be invoked when a view is clicked.
Summary
| Public methods | 
|---|
  
  
  
    | 
        abstract
        
        
        
        
        void | 
      onClick(View v)
      Called when a view has been clicked.
        
    
 | 
  
Public methods
    onClick
    
public abstract void onClick (View v)
    
    
    
  Called when a view has been clicked.
    
    | Parameters | 
|---|
      
        | v | View: The view that was clicked. | 
    
 
 
 
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  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."],[],[]]