android.widget
Class Chronometer

java.lang.Object
  extended by android.view.View
      extended by android.widget.TextView
          extended by android.widget.Chronometer
All Implemented Interfaces:
Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewTreeObserver.OnPreDrawListener

public class Chronometer
extends TextView


Nested Class Summary
static interface Chronometer.OnChronometerTickListener
           
 
Nested classes/interfaces inherited from class android.widget.TextView
TextView.BufferType, TextView.OnEditorActionListener, TextView.SavedState
 
Nested classes/interfaces inherited from class android.view.View
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener
 
Field Summary
 
Fields inherited from class android.view.View
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET
 
Constructor Summary
Chronometer(Context context)
           
Chronometer(Context context, AttributeSet attrs)
           
Chronometer(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
 long getBase()
           
 String getFormat()
           
 Chronometer.OnChronometerTickListener getOnChronometerTickListener()
           
protected  void onDetachedFromWindow()
           
protected  void onWindowVisibilityChanged(int visibility)
           
 void setBase(long base)
           
 void setFormat(String format)
           
 void setOnChronometerTickListener(Chronometer.OnChronometerTickListener listener)
           
 void start()
           
 void stop()
           
 
Methods inherited from class android.widget.TextView
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, didTouchFocusSelect, dispatchPopulateAccessibilityEvent, drawableStateChanged, endBatchEdit, extractText, getAutoLinkMask, getBaseline, getBottomPaddingOffset, getCompoundDrawablePadding, getCompoundDrawables, getCompoundPaddingBottom, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getDefaultEditable, getDefaultMovementMethod, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFocusedRect, getFreezesText, getGravity, getHint, getHintTextColors, getImeActionId, getImeActionLabel, getImeOptions, getInputExtras, getInputType, getKeyListener, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLineBounds, getLineCount, getLineHeight, getLinksClickable, getLinkTextColors, getMovementMethod, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getSelectionEnd, getSelectionStart, getText, getTextColor, getTextColors, getTextColors, getTextScaleX, getTextSize, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasSelection, invalidateDrawable, isInputMethodTarget, isPaddingOffsetRequired, length, moveCursorToVisibleOffset, onAttachedToWindow, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCreateContextMenu, onCreateInputConnection, onDraw, onEditorAction, onEndBatchEdit, onFinishTemporaryDetach, onFocusChanged, onKeyDown, onKeyMultiple, onKeyShortcut, onKeyUp, onMeasure, onPreDraw, onPrivateIMECommand, onRestoreInstanceState, onSaveInstanceState, onSelectionChanged, onStartTemporaryDetach, onTextChanged, onTextContextMenuItem, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, performLongClick, removeTextChangedListener, setAutoLinkMask, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCursorVisible, setEditableFactory, setEllipsize, setEms, setError, setError, setExtractedText, setFilters, setFrame, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setImeActionLabel, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setText, setTextAppearance, setTextColor, setTextColor, setTextKeepState, setTextKeepState, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, verifyDrawable
 
Methods inherited from class android.view.View
addFocusables, addFocusables, addTouchables, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, checkInputConnectionProxy, clearAnimation, clearFocus, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeVerticalScrollOffset, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDraw, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFocusables, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTag, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onConfigurationChanged, onCreateDrawableState, onDisplayHint, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onKeyLongPress, onKeyPreIme, onLayout, onOverScrolled, onScrollChanged, onSetAlpha, onSizeChanged, overScrollBy, performClick, performHapticFeedback, performHapticFeedback, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setOverScrollMode, setPressed, setSaveEnabled, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSoundEffectsEnabled, setTag, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chronometer

public Chronometer(Context context)

Chronometer

public Chronometer(Context context,
                   AttributeSet attrs)

Chronometer

public Chronometer(Context context,
                   AttributeSet attrs,
                   int defStyle)
Method Detail

setBase

public void setBase(long base)

getBase

public long getBase()

setFormat

public void setFormat(String format)

getFormat

public String getFormat()

setOnChronometerTickListener

public void setOnChronometerTickListener(Chronometer.OnChronometerTickListener listener)

getOnChronometerTickListener

public Chronometer.OnChronometerTickListener getOnChronometerTickListener()

start

public void start()

stop

public void stop()

onDetachedFromWindow

protected void onDetachedFromWindow()
Overrides:
onDetachedFromWindow in class TextView

onWindowVisibilityChanged

protected void onWindowVisibilityChanged(int visibility)
Overrides:
onWindowVisibilityChanged in class View


Copyright © 2008-2010. All Rights Reserved.