Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.1.0-alpha01

ListViewCompat

public final class ListViewCompat
extends Object

java.lang.Object
   ↳ androidx.core.widget.ListViewCompat


Helper for accessing features in ListView

Summary

Public methods

static boolean canScrollList(ListView listView, int direction)

Check if the items in the list can be scrolled in a certain direction.

static void scrollListBy(ListView listView, int y)

Scrolls the list items within the view by a specified number of pixels.

Inherited methods

Public methods

canScrollList

added in version 1.0.0
public static boolean canScrollList (ListView listView, 
                int direction)

Check if the items in the list can be scrolled in a certain direction.

Parameters
listView ListView

direction int: Negative to check scrolling up, positive to check scrolling down.

Returns
boolean true if the list can be scrolled in the specified direction, false otherwise.

scrollListBy

added in version 1.0.0
public static void scrollListBy (ListView listView, 
                int y)

Scrolls the list items within the view by a specified number of pixels.

Parameters
listView ListView: the list to scroll

y int: the amount of pixels to scroll by vertically