Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b032cd1f authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Expose View.OnScrollChangeListener interface"

parents d05d9135 f9d7eedc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
  }
+19 −6
Original line number Diff line number Diff line
@@ -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 {
        /**