Methods Summary |
---|
public boolean | dispatchTouchEvent(android.view.MotionEvent ev)
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
if (!mTouchEnabled) {
mTouchCancelled = true;
return false;
}
mTouchCancelled = false;
} else if (mTouchCancelled) {
return false;
} else if (!mTouchEnabled) {
MotionEvent cancel = MotionEvent.obtain(ev);
cancel.setAction(MotionEvent.ACTION_CANCEL);
super.dispatchTouchEvent(ev);
cancel.recycle();
mTouchCancelled = true;
return false;
}
return super.dispatchTouchEvent(ev);
|
public void | fling(int velocityY)
if (!mBlockFlinging) {
super.fling(velocityY);
}
|
private int | getMaxScrollY()
int scrollRange = 0;
if (getChildCount() > 0) {
View child = getChildAt(0);
scrollRange = Math.max(0,
child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
}
return scrollRange;
|
public boolean | isHandlingTouchEvent()
return mHandlingTouchEvent;
|
public boolean | isScrolledToBottom()
return getScrollY() == getMaxScrollY();
|
public boolean | onInterceptTouchEvent(android.view.MotionEvent ev)
mHandlingTouchEvent = true;
mLastX = ev.getX();
mLastY = ev.getY();
boolean result = super.onInterceptTouchEvent(ev);
mHandlingTouchEvent = false;
return result;
|
protected void | onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY)
super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
if (mListener != null && mLastOverscrollAmount > 0) {
mListener.onOverscrolled(mLastX, mLastY, mLastOverscrollAmount);
}
|
protected void | onScrollChanged(int l, int t, int oldl, int oldt)
super.onScrollChanged(l, t, oldl, oldt);
if (mListener != null) {
mListener.onScrollChanged();
}
|
public boolean | onTouchEvent(android.view.MotionEvent ev)
mHandlingTouchEvent = true;
mLastX = ev.getX();
mLastY = ev.getY();
boolean result = super.onTouchEvent(ev);
mHandlingTouchEvent = false;
return result;
|
protected boolean | overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent)
mLastOverscrollAmount = Math.max(0, scrollY + deltaY - getMaxScrollY());
return super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX, scrollRangeY,
maxOverScrollX, maxOverScrollY, isTouchEvent);
|
public void | setBlockFlinging(boolean blockFlinging)
mBlockFlinging = blockFlinging;
|
public void | setListener(com.android.systemui.statusbar.phone.ObservableScrollView$Listener listener)
mListener = listener;
|
public void | setTouchEnabled(boolean touchEnabled)
mTouchEnabled = touchEnabled;
|