Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
    
  
  
   
  
    
  
  
    
    
   
   
  
    added in 
version 22.1.0 
  
    
  belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
  
  
  
  
 
  
   
  
  
   
  
  
  
  
   
  
  
  
  
  
   
  
  
  
  
 
This package is part of the
Android support library  which
is no longer maintained.
The support library has been superseded by AndroidX 
which is part of Jetpack .
We recommend using the AndroidX libraries in all new projects. You should also consider
migrating  existing projects to AndroidX.
To find the AndroidX class that maps to this deprecated class, see the AndroidX
support library class
mappings . 
 
  public
  
  
  
  class
  ListViewAutoScrollHelper
 
  
  
  
  
    extends AutoScrollHelper 
  
  
  
  
  
  
  
    
 
  An implementation of AutoScrollHelper  that knows how to scroll
 through a ListView .
Summary 
Public methods  
  
  
  
  
    
        
        
        
        
        
        boolean
     
  
    
      
      canTargetScrollHorizontally (int direction)
      
      
        Override this method to return whether the target view can be scrolled
 horizontally in a certain direction.
        
    
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        boolean
     
  
    
      
      canTargetScrollVertically (int direction)
      
      
        Override this method to return whether the target view can be scrolled
 vertically in a certain direction.
        
    
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        void
     
  
    
      
      scrollTargetBy (int deltaX, int deltaY)
      
      
        Override this method to scroll the target view by the specified number of
 pixels.
        
    
      
     
   
  
Public constructors 
 
    
    
ListViewAutoScrollHelper (ListView  target)  
    
    
    
  
    
    Parameters  
      
        target 
        
          ListView  
       
    
 
Public methods 
 
    
    
boolean canTargetScrollHorizontally (int direction)  
    
    
    
  Override this method to return whether the target view can be scrolled
 horizontally in a certain direction.
    
    Parameters  
      
        direction 
        
          int: Negative to check scrolling left, positive to check
            scrolling right. 
       
    
    
      Returns  
      
        boolean 
        true if the target view is able to horizontally scroll in the
         specified direction.
 
       
    
 
 
    
    
boolean canTargetScrollVertically (int direction)  
    
    
    
  Override this method to return whether the target view can be scrolled
 vertically in a certain direction.
    
    Parameters  
      
        direction 
        
          int: Negative to check scrolling up, positive to check
            scrolling down. 
       
    
    
      Returns  
      
        boolean 
        true if the target view is able to vertically scroll in the
         specified direction.
 
       
    
 
 
    
    
void scrollTargetBy (int deltaX, 
                int deltaY)  
    
    
    
  Override this method to scroll the target view by the specified number of
 pixels.
    
    Parameters  
      
        deltaX 
        
          int: The number of pixels to scroll by horizontally. 
       
      
        deltaY 
        
          int: The number of pixels to scroll by vertically.
 
       
    
 
 
 
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  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.
 
 
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]