public class RadScrollView extends FrameLayout
View
can be a direct
child of this container. This control is widely based on the native
ScrollView
widget coming with the Android framework.
Portions of ScrollView code from Android Open Source project (as modified by Telerik AD and renamed RadScrollView) - Copyright © 2016 Telerik AD. All rights reserved.FrameLayout.LayoutParams
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
static int |
SCROLLING_MODE_BOTH
Used to activate both horizontal and vertical scrolling mode in
RadScrollView |
static int |
SCROLLING_MODE_HORIZONTAL
Used to activate the horizontal scrolling mode in
RadScrollView |
static int |
SCROLLING_MODE_NONE
Used to deactivate the scrolling mode in
RadScrollView |
static int |
SCROLLING_MODE_VERTICAL
Used to activate the vertical scrolling mode in
RadScrollView |
FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z
Constructor and Description |
---|
RadScrollView(Context context)
Creates an instance of (@link RadScrollView) with the provided
Context |
RadScrollView(Context context,
AttributeSet attrs)
Creates an instance of (@link RadScrollView) with the provided
Context
and AttributeSet |
RadScrollView(Context context,
AttributeSet attrs,
int defStyle)
Creates an instance of (@link RadScrollView) with the provided
Context ,
AttributeSet . |
Modifier and Type | Method and Description |
---|---|
void |
addView(View child) |
void |
addView(View child,
int index) |
void |
addView(View child,
int index,
ViewGroup.LayoutParams params) |
void |
addView(View child,
ViewGroup.LayoutParams params) |
boolean |
arrowScroll(int direction)
Handle scrolling in response to an up or down arrow click.
|
void |
computeScroll() |
boolean |
dispatchKeyEvent(KeyEvent event) |
void |
draw(Canvas canvas) |
boolean |
executeKeyEvent(KeyEvent event)
You can call this function yourself to have the scroll view perform
scrolling from a key event, just as if the event had been dispatched to
it by the view hierarchy.
|
void |
fling(int velocityX,
int velocityY)
Fling the scroll view
|
boolean |
fullScroll(int direction)
Handles scrolling in response to a "home/end" shortcut press.
|
int |
getMaxHorizontalScrollAmount() |
int |
getMaxVerticalScrollAmount() |
int |
getScrollMode()
Returns the currently active scroll mode.
|
boolean |
isFillViewport()
Indicates whether this ScrollView's content is stretched to fill the viewport.
|
boolean |
isSmoothScrollingEnabled() |
boolean |
onGenericMotionEvent(MotionEvent event) |
void |
onInitializeAccessibilityEvent(AccessibilityEvent event) |
void |
onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) |
boolean |
onInterceptTouchEvent(MotionEvent ev) |
boolean |
onTouchEvent(MotionEvent ev) |
boolean |
pageScroll(int direction)
Handles scrolling in response to a "page up/down" shortcut press.
|
boolean |
performAccessibilityAction(int action,
Bundle arguments) |
void |
requestChildFocus(View child,
View focused) |
boolean |
requestChildRectangleOnScreen(View child,
Rect rectangle,
boolean immediate) |
void |
requestDisallowInterceptTouchEvent(boolean disallowIntercept) |
void |
requestLayout() |
void |
scrollTo(int x,
int y)
This version also clamps the scrolling to the bounds of our child.
|
void |
setFillViewport(boolean fillViewport)
Indicates this ScrollView whether it should stretch its content height to fill
the viewport or not.
|
void |
setOverScrollMode(int mode) |
void |
setScrollMode(int scrollMode)
Sets the active scroll mode.
|
void |
setSmoothScrollingEnabled(boolean smoothScrollingEnabled)
Set whether arrow scrolling will animate its transition.
|
boolean |
shouldDelayChildPressedState() |
void |
smoothScrollBy(int dx,
int dy)
Like
View.scrollBy(int, int) , but scroll smoothly instead of immediately. |
void |
smoothScrollTo(int x,
int y)
Like
scrollTo(int, int) , but scroll smoothly instead of immediately. |
generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
public static final int SCROLLING_MODE_NONE
RadScrollView
public static final int SCROLLING_MODE_VERTICAL
RadScrollView
public static final int SCROLLING_MODE_HORIZONTAL
RadScrollView
public static final int SCROLLING_MODE_BOTH
RadScrollView
public RadScrollView(Context context)
Context
public RadScrollView(Context context, AttributeSet attrs)
Context
and AttributeSet
public RadScrollView(Context context, AttributeSet attrs, int defStyle)
Context
,
AttributeSet
.public boolean shouldDelayChildPressedState()
shouldDelayChildPressedState
in class FrameLayout
public int getMaxVerticalScrollAmount()
public int getMaxHorizontalScrollAmount()
public void addView(View child, ViewGroup.LayoutParams params)
addView
in interface ViewManager
addView
in class ViewGroup
public void addView(View child, int index, ViewGroup.LayoutParams params)
public boolean isFillViewport()
public void setFillViewport(boolean fillViewport)
fillViewport
- True to stretch the content's height to the viewport's
boundaries, false otherwise.public void setScrollMode(int scrollMode)
SCROLLING_MODE_NONE
, SCROLLING_MODE_VERTICAL
,
SCROLLING_MODE_HORIZONTAL
or SCROLLING_MODE_BOTH
.
The scroll mode defines whether the RadScrollView
instance will scroll vertically, horizontally,
in both directions or in neither direction.public int getScrollMode()
SCROLLING_MODE_NONE
, SCROLLING_MODE_VERTICAL
,
SCROLLING_MODE_HORIZONTAL
or SCROLLING_MODE_BOTH
.public boolean isSmoothScrollingEnabled()
public void setSmoothScrollingEnabled(boolean smoothScrollingEnabled)
smoothScrollingEnabled
- whether arrow scrolling will animate its transitionpublic boolean dispatchKeyEvent(KeyEvent event)
dispatchKeyEvent
in class ViewGroup
public boolean executeKeyEvent(KeyEvent event)
event
- The key event to execute.public void requestDisallowInterceptTouchEvent(boolean disallowIntercept)
requestDisallowInterceptTouchEvent
in interface ViewParent
requestDisallowInterceptTouchEvent
in class ViewGroup
public boolean onInterceptTouchEvent(MotionEvent ev)
onInterceptTouchEvent
in class ViewGroup
public boolean onTouchEvent(MotionEvent ev)
onTouchEvent
in class View
public boolean onGenericMotionEvent(MotionEvent event)
onGenericMotionEvent
in class View
public boolean performAccessibilityAction(int action, Bundle arguments)
performAccessibilityAction
in class View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
onInitializeAccessibilityNodeInfo
in class View
public void onInitializeAccessibilityEvent(AccessibilityEvent event)
onInitializeAccessibilityEvent
in class View
public boolean pageScroll(int direction)
Handles scrolling in response to a "page up/down" shortcut press. This method will scroll the view by one page up or down and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.
direction
- the scroll direction: View.FOCUS_UP
to go one page up or
View.FOCUS_DOWN
to go one page downpublic boolean fullScroll(int direction)
Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.
direction
- the scroll direction: View.FOCUS_UP
to go the top of the view or
View.FOCUS_DOWN
to go the bottompublic boolean arrowScroll(int direction)
direction
- The direction corresponding to the arrow key that was
pressedpublic final void smoothScrollBy(int dx, int dy)
View.scrollBy(int, int)
, but scroll smoothly instead of immediately.dx
- the number of pixels to scroll by on the X axisdy
- the number of pixels to scroll by on the Y axispublic final void smoothScrollTo(int x, int y)
scrollTo(int, int)
, but scroll smoothly instead of immediately.x
- the position where to scroll on the X axisy
- the position where to scroll on the Y axispublic void computeScroll()
computeScroll
in class View
public void requestChildFocus(View child, View focused)
requestChildFocus
in interface ViewParent
requestChildFocus
in class ViewGroup
public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate)
requestChildRectangleOnScreen
in interface ViewParent
requestChildRectangleOnScreen
in class ViewGroup
public void requestLayout()
requestLayout
in interface ViewParent
requestLayout
in class View
public void fling(int velocityX, int velocityY)
velocityY
- The initial velocity in the Y direction. Positive
numbers mean that the finger/cursor is moving down the screen,
which means we want to scroll towards the top.public void scrollTo(int x, int y)
public void setOverScrollMode(int mode)
setOverScrollMode
in class View