Example usage for Java android.widget ScrollView fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addView(View child) |
void | addView(View child, int index) |
void | addView(View child, ViewGroup.LayoutParams params) |
void | addView(View child, int index, ViewGroup.LayoutParams params) |
boolean | canScrollVertically(int direction) Check if this view can be scrolled vertically in a certain direction. |
int | computeVerticalScrollExtent() Compute the vertical extent of the vertical scrollbar's thumb within the vertical range. |
int | computeVerticalScrollOffset() |
int | computeVerticalScrollRange() The scroll range of a scroll view is the overall height of all of its children. |
void | draw(Canvas canvas) |
T | findViewById(@IdRes int id) Finds the first descendant view with the given ID, the view itself if the ID matches #getId() , or null if the ID is invalid (< 0) or there is no matching view in the hierarchy. |
boolean | fullScroll(int direction) Handles scrolling in response to a "home/end" shortcut press. |
View | getChildAt(int index) Returns the view at the specified position in the group. |
int | getChildCount() Returns the number of children in the group. |
void | getDrawingRect(Rect outRect) Return the visible drawing bounds of your view. |
int | getHeight() Return the height of your view. |
void | getHitRect(Rect outRect) Hit rectangle in parent's coordinates |
ViewGroup.LayoutParams | getLayoutParams() Get the LayoutParams associated with this view. |
void | getLocationOnScreen(@Size(2) int[] outLocation) Computes the coordinates of this view on the screen. |
int | getMeasuredHeight() Like #getMeasuredHeightAndState() , but only returns the raw height component (that is the result is masked by #MEASURED_SIZE_MASK ). |
int | getPaddingBottom() Returns the bottom padding of this view. |
int | getPaddingTop() Returns the top padding of this view. |
ViewParent | getParent() Gets the parent of this view. |
Resources | getResources() Returns the resources associated with this view. |
int | getScrollY() Return the scrolled top position of this view. |
ViewTreeObserver | getViewTreeObserver() Returns the ViewTreeObserver for this view's hierarchy. |
int | getVisibility() Returns the visibility status for this view. |
int | getWidth() Return the width of your view. |
float | getY() The visual y position of this view, in pixels. |
void | invalidate() Invalidate the whole view. |
void | measure(int widthMeasureSpec, int heightMeasureSpec) This is called to find out how big a view should be. |
void | offsetDescendantRectToMyCoords(View descendant, Rect rect) Offset a rectangle that is in a descendant's coordinate space into our coordinate space. |
boolean | post(Runnable action) Causes the Runnable to be added to the message queue. |
boolean | postDelayed(Runnable action, long delayMillis) Causes the Runnable to be added to the message queue, to be run after the specified amount of time elapses. |
void | removeAllViews() Call this method to remove all child views from the ViewGroup. |
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 | setAccessibilityDelegate(@Nullable AccessibilityDelegate delegate) Sets a delegate for implementing accessibility support via composition (as opposed to inheritance). |
void | setBackground(Drawable background) Set the background to a given Drawable, or remove the background. |
void | setBackgroundColor(@ColorInt int color) Sets the background color for this view. |
void | setDescendantFocusability(int focusability) Set the descendant focusability of this view group. |
void | setFadingEdgeLength(int length) Set the size of the faded edge used to indicate that more content in this view is available. |
void | setFillViewport(boolean fillViewport) Indicates this ScrollView whether it should stretch its content height to fill the viewport or not. |
void | setFocusable(boolean focusable) Set whether this view can receive the focus. |
void | setFocusableInTouchMode(boolean focusableInTouchMode) Set whether this view can receive focus while in touch mode. |
void | setHorizontalScrollBarEnabled(boolean horizontalScrollBarEnabled) Define whether the horizontal scrollbar should be drawn or not. |
void | setLayoutParams(ViewGroup.LayoutParams params) Set the layout parameters associated with this view. |
void | setOnTouchListener(OnTouchListener l) Register a callback to be invoked when a touch event is sent to this view. |
void | setOverScrollMode(int mode) |
void | setPadding(int left, int top, int right, int bottom) Sets the padding. |
void | setScrollY(int value) Set the vertical scrolled position of your view. |
void | setSmoothScrollingEnabled(boolean smoothScrollingEnabled) Set whether arrow scrolling will animate its transition. |
void | setTag(final Object tag) Sets the tag associated with this view. |
void | setVerticalScrollBarEnabled(boolean verticalScrollBarEnabled) Define whether the vertical scrollbar should be drawn or not. |
void | setVisibility(@Visibility int visibility) Set the visibility state of this view. |
void | smoothScrollTo(int x, int y) Like #scrollTo , but scroll smoothly instead of immediately. |
void | startAnimation(Animation animation) Start the specified animation now. |