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

Clocks

This library contains several time related views. Presently they are Chronometer,
DigitalClock and AnalogClock.

List of types:

AnalogClock
Chronometer
DigitalClock

AnalogClock

AnalogClock is, well, an analog clock. It is always displayed as a circle within
the bounds of the view. It is based on a so View all the View properties and methods
are available to tailor its appearance.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  Background As android.graphics.drawable.Drawable

  Color As Int [write only]

  Enabled As Boolean

  Height As Int

  Initialize (arg1 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

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

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

  Tag As Object

  Top As Int

  Version As Double [read only]

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
Color As Int [write only]
Enabled As Boolean
Height As Int
Initialize (arg1 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
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
Tag As Object
Top As Int
Version As Double [read only]
Returns the version of the library.
Visible As Boolean
Width As Int

Chronometer

Chronometer is a view that counts up from zero when started. It is based on a TextView
so all the TextView properties and methods are available to tailor its appearance.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

Tick 'The Chronometer value has changed

Members:


  Background As android.graphics.drawable.Drawable

  BaseTime As Long

  Color As Int [write only]

  Enabled As Boolean

  Format As String

  GetElapsedRealTime As Long

  Gravity As Int

  Height As Int

  Initialize (arg1 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

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

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

  Start

  Stop

  Tag As Object

  Text As String

  TextColor As Int

  TextSize As Float

  Top As Int

  Typeface As android.graphics.Typeface

  Version As Double [read only]

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
BaseTime As Long
Gets or sets the base or zero time in milliseconds from which the Chronometer measures time
against the system clock elapsed real time. Normally this should be set to ElapsedRealTime
before starting the Chronometer so it counts from zero. If the Chronometer value is to be
maintained across activity pause and resume the value used when the Chronometer was started
should be saved on Pause and restored to BaseTime on resume.
Color As Int [write only]
Enabled As Boolean
Format As String
Gets or sets the format string used for display. The Chronometer will display this string,
with the first "%s" replaced by the current timer value in "MM:SS" or "H:MM:SS" form.
If the format string is null, or if you never call setFormat(), the Chronometer will simply
display the timer value in "MM:SS" or "H:MM:SS" form.
GetElapsedRealTime As Long
This is the time in milliseconds from since the system was booted, including deep sleep.
Gravity As Int
Height As Int
Initialize (arg1 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
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
Start
Start the Chronometer counting.
Stop
Stop the Chronometer counting.
Tag As Object
Text As String
TextColor As Int
TextSize As Float
Top As Int
Typeface As android.graphics.Typeface
Version As Double [read only]
Returns the version of the library.
Visible As Boolean
Width As Int

DigitalClock

DigitalClock is, well, a digital clock. It is based on a TextView so all the TextView
properties and methods are available to tailor its appearance.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  Background As android.graphics.drawable.Drawable

  Color As Int [write only]

  Enabled As Boolean

  Gravity As Int

  Height As Int

  Initialize (arg1 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

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

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

  Tag As Object

  Text As String

  TextColor As Int

  TextSize As Float

  Top As Int

  Typeface As android.graphics.Typeface

  Version As Double [read only]

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
Color As Int [write only]
Enabled As Boolean
Gravity As Int
Height As Int
Initialize (arg1 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
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
Tag As Object
Text As String
TextColor As Int
TextSize As Float
Top As Int
Typeface As android.graphics.Typeface
Version As Double [read only]
Returns the version of the library.
Visible As Boolean
Width As Int

Top