Merge "Expose View.OnScrollChangeListener interface"

This commit is contained in:
Alan Viverette
2015-01-28 00:02:20 +00:00
committed by Android (Google) Code Review
2 changed files with 24 additions and 6 deletions

View File

@@ -34084,6 +34084,7 @@ package android.view {
method public void setOnHoverListener(android.view.View.OnHoverListener);
method public void setOnKeyListener(android.view.View.OnKeyListener);
method public void setOnLongClickListener(android.view.View.OnLongClickListener);
method public void setOnScrollChangeListener(android.view.View.OnScrollChangeListener);
method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener);
method public void setOnTouchListener(android.view.View.OnTouchListener);
method public void setOutlineProvider(android.view.ViewOutlineProvider);
@@ -34351,6 +34352,10 @@ package android.view {
method public abstract boolean onLongClick(android.view.View);
}
public static abstract interface View.OnScrollChangeListener {
method public abstract void onScrollChange(android.view.View, int, int, int, int);
}
public static abstract interface View.OnSystemUiVisibilityChangeListener {
method public abstract void onSystemUiVisibilityChange(int);
}

View File

@@ -4569,11 +4569,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
/**
* Register a callback to be invoked when the scroll position of this view
* changed.
* Register a callback to be invoked when the scroll X or Y positions of
* this view change.
* <p>
* <b>Note:</b> Some views handle scrolling independently from View and may
* have their own separate listeners for scroll-type events. For example,
* {@link android.widget.ListView ListView} allows clients to register an
* {@link android.widget.ListView#setOnScrollListener(android.widget.AbsListView.OnScrollListener) AbsListView.OnScrollListener}
* to listen for changes in list scroll position.
*
* @param l The callback that will run.
* @hide Only used internally.
* @param l The listener to notify when the scroll X or Y position changes.
* @see android.view.View#getScrollX()
* @see android.view.View#getScrollY()
*/
public void setOnScrollChangeListener(OnScrollChangeListener l) {
getListenerInfo().mOnScrollChangeListener = l;
@@ -9942,9 +9949,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* Interface definition for a callback to be invoked when the scroll
* position of a view changes.
* X or Y positions of a view change.
* <p>
* <b>Note:</b> Some views handle scrolling independently from View and may
* have their own separate listeners for scroll-type events. For example,
* {@link android.widget.ListView ListView} allows clients to register an
* {@link android.widget.ListView#setOnScrollListener(android.widget.AbsListView.OnScrollListener) AbsListView.OnScrollListener}
* to listen for changes in list scroll position.
*
* @hide Only used internally.
* @see #setOnScrollChangeListener(View.OnScrollChangeListener)
*/
public interface OnScrollChangeListener {
/**