Most visited

Recently visited

Added in API level 1
Deprecated since API level 17

DigitalClock

public class DigitalClock
extends TextView

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.DigitalClock


This class was deprecated in API level 17.
It is recommended you use TextClock instead.

Like AnalogClock, but digital. Shows seconds.

Summary

Inherited XML attributes

From class android.widget.TextView
From class android.view.View

Inherited constants

From class android.view.View

Inherited fields

From class android.view.View

Public constructors

DigitalClock(Context context)
DigitalClock(Context context, AttributeSet attrs)

Public methods

CharSequence getAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.

Protected methods

void onAttachedToWindow()

This is called when the view is attached to a window.

void onDetachedFromWindow()

This is called when the view is detached from a window.

Inherited methods

From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.view.ViewTreeObserver.OnPreDrawListener
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

DigitalClock

Added in API level 1
DigitalClock (Context context)

Parameters
context Context

DigitalClock

Added in API level 1
DigitalClock (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

Public methods

getAccessibilityClassName

Added in API level 23
CharSequence getAccessibilityClassName ()

Return the class name of this object to be used for accessibility purposes. Subclasses should only override this if they are implementing something that should be seen as a completely new class of view when used by accessibility, unrelated to the class it is deriving from. This is used to fill in AccessibilityNodeInfo.setClassName.

Returns
CharSequence

Protected methods

onAttachedToWindow

Added in API level 1
void onAttachedToWindow ()

This is called when the view is attached to a window. At this point it has a Surface and will start drawing. Note that this function is guaranteed to be called before onDraw(android.graphics.Canvas), however it may be called any time before the first onDraw -- including before or after onMeasure(int, int).

onDetachedFromWindow

Added in API level 1
void onDetachedFromWindow ()

This is called when the view is detached from a window. At this point it no longer has a surface for drawing.

Hooray!