ListViewCompat

class ListViewCompat
kotlin.Any
   ↳ androidx.core.widget.ListViewCompat

Helper for accessing features in ListView

Summary

Public methods

static Boolean
canScrollList(@NonNull listView: ListView, direction: Int)

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

static Unit
scrollListBy(@NonNull listView: ListView, y: Int)

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

Public methods

canScrollList

static fun canScrollList(
    @NonNull listView: ListView,
    direction: Int
): Boolean

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

Parameters
direction Int: Negative to check scrolling up, positive to check scrolling down.
Return
Boolean true if the list can be scrolled in the specified direction, false otherwise.

scrollListBy

static fun scrollListBy(
    @NonNull listView: ListView,
    y: Int
): Unit

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