Android APIs
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.

Class Overview

Like AnalogClock, but digital. Shows seconds.

Summary

[Expand]
Inherited XML Attributes
From class android.widget.TextView
From class android.view.View
[Expand]
Inherited Constants
From class android.view.View
[Expand]
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.
[Expand]
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

public DigitalClock (Context context)

Added in API level 1

public DigitalClock (Context context, AttributeSet attrs)

Added in API level 1

Public Methods

public CharSequence getAccessibilityClassName ()

Added in API level 23

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.

Protected Methods

protected void onAttachedToWindow ()

Added in API level 1

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).

protected void onDetachedFromWindow ()

Added in API level 1

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