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

WheelView

Written by Derez

List of types:

WheelView

WheelView

WheelView creates a rotating wheel with list of text items.
The value that is at the center when the wheel stop can be read
by a Tick event sub, using ReadWheel method.
ScrollChanged(Position as int) event can be used
to get the scroll position, but it is not required
for the operation of the wheel.
The cover bitmap which gives the wheel its shape is attached and
should be put on a panel with the same size and place as the WheelView.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

ScrollChanged(Position As Int)
Tick

Members:


  Background As android.graphics.drawable.Drawable

  BringToFront

  Color As Int [write only]

  Delay As Long [write only]

  Enabled As Boolean

  FullScroll (Bottom As Boolean)

  Gravity As Int [write only]

  Height As Int

  Initialize (Wheelstep As Int, First As Int, Last As Int, Cyclic As Boolean, EventName As String)

  Initialize1 (Wheelstep As Int, list As List, Cyclic As Boolean, EventName As String)

  Initialize2 (Wheelstep As Int, Values() As String, Cyclic As Boolean, EventName As String)

  Invalidate

  Invalidate2 (arg0 As android.graphics.Rect)

  Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  IsInitialized As Boolean

  Left As Int

  ReadWheel As String

  RemoveView

  RequestFocus As Boolean

  ScrollPosition As Int

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

  SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  SetToValue (index As Int)

  Tag As Object

  TextColor As Int

  TextSize As Int

  Top As Int

  UpdateList (list As List)

  UpdateValues (Values() As String)

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
BringToFront
Color As Int [write only]
Sets the background color of the wheel panel and the items on the wheel.
Delay As Long [write only]
Sets the time delay in milliseconds,
for the wheel to halt with an item in the center.
Enabled As Boolean
FullScroll (Bottom As Boolean)
Scrolls the WheelView to the top or bottom.
Gravity As Int [write only]
Sets the text alignment on the wheel.
Height As Int
Initialize (Wheelstep As Int, First As Int, Last As Int, Cyclic As Boolean, EventName As String)
Initializes the WheelView with the growing numbers
from first to last, with steps of 1.
Set Cyclic True if you want the wheel to be cyclic.
Wheelstep defines the height of each digit label.
Initialize1 (Wheelstep As Int, list As List, Cyclic As Boolean, EventName As String)
Initializes the WheelView with the content of a list.
Set Cyclic True if you want the wheel to be cyclic.
Wheelstep defines the height of each digit label.
Initialize2 (Wheelstep As Int, Values() As String, Cyclic As Boolean, EventName As String)
Initializes the WheelView with the set of values
as defined by the Values array.
Set Cyclic True if you want the wheel to be cyclic.
Wheelstep defines the height of each digit label.
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
IsInitialized As Boolean
Left As Int
ReadWheel As String
Returns the string value which is displayed on the wheel when stopped.
Should be used inside the Tick event sub.
RemoveView
RequestFocus As Boolean
ScrollPosition As Int
Gets or sets the scroll position.
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
SetToValue (index As Int)
Sets the wheel to value by list index parameter.
Tag As Object
TextColor As Int
Gets or sets the text color of the items on the wheel.
TextSize As Int
Gets or sets the textsize of the items on the wheel.
Top As Int
UpdateList (list As List)
Updates the value by list.
The list may be smaller or larger than the original.
UpdateValues (Values() As String)
Updates the value by string array
The array may be smaller or larger than the original.
Visible As Boolean
Width As Int

Top