lightbulb_outline Please take our October 2018 developer survey. Start survey

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.

Summary

Inherited XML attributes

Inherited constants

Inherited fields

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

Public constructors

DigitalClock

added in API level 1
public DigitalClock (Context context)

Parameters
context Context

DigitalClock

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

Parameters
context Context

attrs AttributeSet

Public methods

getAccessibilityClassName

added in API level 23
public 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
protected 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
protected void onDetachedFromWindow ()

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