ListViewCompat

Added in 1.1.0
Deprecated in 1.13.0

public final class ListViewCompat


Helper for accessing features in ListView.

Summary

Public methods

static boolean
@ReplaceWith(expression = "listView.canScrollList(direction)")
canScrollList(@NonNull ListView listView, int direction)

This method is deprecated.

Use canScrollList directly.

static void
@ReplaceWith(expression = "listView.scrollListBy(y)")
scrollListBy(@NonNull ListView listView, int y)

This method is deprecated.

Use scrollListBy directly.

Public methods

canScrollList

Added in 1.1.0
Deprecated in 1.13.0
@ReplaceWith(expression = "listView.canScrollList(direction)")
public static boolean canScrollList(@NonNull ListView listView, int direction)

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

Parameters
@NonNull ListView listView

ListView for which to check the state.

int direction

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.

See also
scrollListBy

scrollListBy

Added in 1.1.0
Deprecated in 1.13.0
@ReplaceWith(expression = "listView.scrollListBy(y)")
public static void scrollListBy(@NonNull ListView listView, int y)

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

Parameters
@NonNull ListView listView

the list to scroll

int y

the amount of pixels to scroll by vertically