Android Programming Press on the image to return to the main documentation page.

ScrollView2D

Written by Fr\u00e9d\u00e9ric Leneuf-Magaud

ScrollView2D = HorizontalScrollView + VerticalScrollView

List of types:

ScrollView2D

ScrollView2D


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

ScrollChanged(PosX As Int, PosY As Int)

Members:


  Background As android.graphics.drawable.Drawable

  BringToFront

  Color As Int [write only]

  DisableTouchEventInterception (Disabled As Boolean)

  Enabled As Boolean

  FadingEdges (Enabled As Boolean)

  FS_DIR_HORZ As Byte

  FS_DIR_HORZ_AND_VERT As Byte

  FS_DIR_VERT As Byte

  FS_ToTheEND As Boolean

  FullScroll (Direction As Byte, ToTheEnd As Boolean, Smoothly As Boolean)

  GiveFocusToFirstVisible

  Height As Int

  HorizontalScrollPosition As Int

  Initialize (Width As Int, Height As Int, EventName As String)

  Invalidate

  Invalidate2 (Rect As android.graphics.Rect)

  Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int)

  IsInitialized As Boolean

  Left As Int

  Panel As PanelWrapper [read only]

  RemoveView

  RequestFocus As Boolean

  ScrollbarsVisibility (HorizontalVisible As Boolean, VerticalVisible As Boolean)

  ScrollingIsFinished As Boolean

  SendToBack

  SetBackgroundImage (Bitmap As android.graphics.Bitmap)

  SetLayout (Left As Int, Top As Int, Width As Int, Height As Int)

  SmoothScrollTo (PosX As Int, PosY As Int)

  Tag As Object

  Top As Int

  VerticalScrollPosition As Int

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
Gets or sets the background drawable.
BringToFront
Changes the Z order of this view and brings it to the front.
Color As Int [write only]
Sets the background of the view to be a ColorDrawable with the given color.
If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
DisableTouchEventInterception (Disabled As Boolean)
Prevents the ScrollView2D from intercepting the touch events.
You should only call this function when the SV2D is in conflict with its parent about scrolling (e.g. AHViewPager).
Enabled As Boolean
FadingEdges (Enabled As Boolean)
Defines whether the edges should be faded when this view is scrolled.
They are faded by default.
FS_DIR_HORZ As Byte
FS_DIR_HORZ_AND_VERT As Byte
FS_DIR_VERT As Byte
FS_ToTheEND As Boolean
FullScroll (Direction As Byte, ToTheEnd As Boolean, Smoothly As Boolean)
Scrolls the scroll view to the beginning or end, horizontally or/and vertically.
Direction:
0 = horizontally
1 = vertically
2 = horizontally and vertically
GiveFocusToFirstVisible
Sets the focus to the first focusable view in the visible area of the ScrollView2D panel.
You should call this function after a FullScroll, SmoothScrollTo or H/VScrollPosition to move the focus.
Height As Int
Gets or sets the view's height.
HorizontalScrollPosition As Int
Gets/sets the horizontal scroll position.
Initialize (Width As Int, Height As Int, EventName As String)
Initializes the ScrollView and sets its inner panel dimensions to the given width and height.
You can later change these dimensions by calling ScrollView2D.Panel.Width or ScrollView2D.Panel.Height.

You should never use a ScrollView2D with a ListView, since ListView takes care of its own scrolling.
Most importantly, doing this defeats all of the important optimizations in ListView for dealing with
large lists, since it effectively forces the ListView to display its entire list of items to fill up
the infinite container supplied by ScrollView2D.
Invalidate
Invalidates the whole view forcing the view to redraw itself.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (Rect As android.graphics.Rect)
Invalidates the given rectangle.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int)
Invalidates the given rectangle.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitialized As Boolean
Left As Int
Gets or sets the view's left.
Panel As PanelWrapper [read only]
RemoveView
Removes this view from its parent.
RequestFocus As Boolean
Tries to set the focus to this view.
Returns True if the focus was set.
ScrollbarsVisibility (HorizontalVisible As Boolean, VerticalVisible As Boolean)
Sets the scrollbars visibility.
They are visible by default.
ScrollingIsFinished As Boolean
Returns whether the ScrollView2D has finished scrolling.
SendToBack
Changes the Z order of this view and sends it to the back.
SetBackgroundImage (Bitmap As android.graphics.Bitmap)
SetLayout (Left As Int, Top As Int, Width As Int, Height As Int)
Changes the view position and size.
SmoothScrollTo (PosX As Int, PosY As Int)
Scrolls smoothly to the given position.
Tag As Object
Gets or sets the Tag value. This is a place holder which can used to store additional data.
Top As Int
Gets or sets the view's top.
VerticalScrollPosition As Int
Gets/sets the vertical scroll position.
Visible As Boolean
Width As Int
Gets or sets the view's width.
Top