Merge "Add API for scrolling AbsListView by a pixel amount"
diff --git a/api/current.txt b/api/current.txt
index 95f5be8..71ab2d5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -29826,6 +29826,7 @@
method public int pointToPosition(int, int);
method public long pointToRowId(int, int);
method public void reclaimViews(java.util.List<android.view.View>);
+ method public boolean scrollListBy(int);
method public void setAdapter(android.widget.ListAdapter);
method public void setCacheColorHint(int);
method public void setChoiceMode(int);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index d8a2eda..2d7637c 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4836,6 +4836,17 @@
}
/**
+ * Scrolls the list items within the view by a specified number of pixels.
+ *
+ * @param y the amount of pixels to scroll by vertically
+ * @return true if the list is able to scroll, or false if the list is
+ * already at the beginning/end and unable to scroll any more.
+ */
+ public boolean scrollListBy(int y) {
+ return !trackMotionScroll(-y, -y);
+ }
+
+ /**
* Track a motion scroll
*
* @param deltaY Amount to offset mMotionView. This is the accumulated delta since the motion