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

MLStopWatch

Written by Jem Miller - Missing Link Software

List of types:

MLStopWatch

MLStopWatch


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

Events:

None

Members:


  Background As android.graphics.drawable.Drawable

  BringToFront

  Color As Int [write only]

  ElapsedTime As Long [read only]

  Enabled As Boolean

  GetTime As Long

  Gravity As Int

  Height As Int

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

  isRunning As Boolean

  Lap

  Laps As java.util.List [read only]

  Left As Int

  Pause

  RemoveView

  RequestFocus As Boolean

  Reset

  Resume

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

  SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)

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

  SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)

  SetTextColorAnimated (arg0 As Int, arg1 As Int)

  SetTextSizeAnimated (arg0 As Int, arg1 As Float)

  SetVisibleAnimated (arg0 As Int, arg1 As Boolean)

  Split As String

  Start

  Stop

  Tag As Object

  Text As String

  TextColor As Int

  TextSize As Float

  Top As Int

  Typeface As android.graphics.Typeface

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
BringToFront
Color As Int [write only]
ElapsedTime As Long [read only]
Returns The amount of time recorded by the stopwatch, in milliseconds
Enabled As Boolean
GetTime As Long
Implements a method that returns the current time, in milliseconds.
Gravity As Int
Height As Int
Initialize (EventName As String)
Initializes the Stopwatch.
No events are supported, so just pass ""
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
IsInitialized As Boolean
isRunning As Boolean
Returns True if the stopwatch is currently running or False otherwise.
Lap
Record a lap at the current elapsed time.
Laps As java.util.List [read only]
Returns A list of the lap times recorded. Each lap is given as a formatted string value from when the stopwatch began running.

Example :
00:03.12
00:11.87
00:26.41
Left As Int
Pause
Pause the stopwatch. Does nothing If the stopwatch is not running.
RemoveView
RequestFocus As Boolean
Reset
Reset the stopwatch to the initial state This clears ALL stored lap times and sets the view to 00:00.00.
Resume
Resumes the stopwatch.
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
SetTextColorAnimated (arg0 As Int, arg1 As Int)
SetTextSizeAnimated (arg0 As Int, arg1 As Float)
SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
Split As String
Returns the split time between calls to Split for times between objects.
Split pauses the stopwatch and displays the split time. The Split function is cancelled by a call to Resume, Stop or Reset.

Returns the split time in a formatted string as Hours:Minutes:Seconds.milliseconds. Will return 00:00.00 on the first call and the split time offset on subsequent calls.
This method also updates the stopwatch display with the current split time. Call Resume to display the running elapsed time again.
Start
Starts the stopwatch (starts from 00:00.00).
Stop
Stops the stopwatch.
Tag As Object
Text As String
TextColor As Int
TextSize As Float
Top As Int
Typeface As android.graphics.Typeface
Visible As Boolean
Width As Int

Top