|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.view.View
android.view.ViewGroup
android.widget.RelativeLayout
com.wimm.framework.watches.BaseWatchView
com.wimm.framework.watches.DigitalWatchView
public class DigitalWatchView
The DigitalWatchView class extends BaseWatchView
to provide digital watch functionality.
The constant variables for this class draw the watchface and watchface assets in active and passive mode.
Note: See the Watchface Tutorial for more information about developing watchfaces.
Nested Class Summary | |
---|---|
static class |
DigitalWatchView.NumberTransition
NumberTransition enumerates BLIT, CROSSFADE, and FLIP named type constants for setTransitionType(com.wimm.framework.watches.DigitalWatchView.NumberTransition) . |
Nested classes/interfaces inherited from class com.wimm.framework.watches.BaseWatchView |
---|
BaseWatchView.UpdateResolution |
Nested classes/interfaces inherited from class android.widget.RelativeLayout |
---|
RelativeLayout.LayoutParams |
Nested classes/interfaces inherited from class android.view.ViewGroup |
---|
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener |
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 | |
---|---|
static int |
DRAW_FACE
Tag for the watchface canvas asset. |
static int |
DRAW_HOUR1_ACTIVE
Tag for the first of the four digits on the watchface. |
static int |
DRAW_HOUR1_PASSIVE
Tag for the first of the four digits on the watchface, in passive mode. |
static int |
DRAW_HOUR2_ACTIVE
Tag for the second of the four digits on the the watchface. |
static int |
DRAW_HOUR2_PASSIVE
Tag for the second of the four digits on the watchface, in passive mode. |
static int |
DRAW_MINUTE1_ACTIVE
Tag for the third of the four digits on the watchface. |
static int |
DRAW_MINUTE1_PASSIVE
Tag for the third of the four digits on the watchface, in passive mode. |
static int |
DRAW_MINUTE2_ACTIVE
Tag for the last of the four digits on the watchface. |
static int |
DRAW_MINUTE2_PASSIVE
Tag for the last of the four digits on the watchface, in passive mode. |
static int |
DRAW_SEPARATOR_OFF_ACTIVE
Tag for the the separator's OFF state in active mode. |
static int |
DRAW_SEPARATOR_ON_ACTIVE
Tag for the the separator's ON state in active mode. |
static int |
DRAW_SEPARATOR_PASSIVE
Tag for the spacer that separates the hour and minute digits, in passive mode. |
static int |
DRAW_SPACER_ACTIVE
Tag for the spacer that separates the hour and minute digits. |
static int |
DRAW_SPACER_PASSIVE
Tag for the spacer that separates the hour and minute digits, in passive mode. |
Fields inherited from class com.wimm.framework.watches.BaseWatchView |
---|
DRAW_BACKGROUND_ACTIVE, DRAW_BACKGROUND_PASSIVE |
Fields inherited from class android.widget.RelativeLayout |
---|
ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, LEFT_OF, RIGHT_OF, TRUE |
Fields inherited from class android.view.ViewGroup |
---|
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE |
Constructor Summary | |
---|---|
DigitalWatchView(Context context,
AttributeSet attrs)
Instantiates a new digital watch view. |
Method Summary | |
---|---|
void |
setDrawable(int tag,
Drawable drawable)
Sets a watchface asset from a Drawable. |
void |
setTransitionType(DigitalWatchView.NumberTransition transitionType)
Sets the transition type (see DigitalWatchView.NumberTransition ). |
Methods inherited from class com.wimm.framework.watches.BaseWatchView |
---|
animateFromPreview, drawComplications, drawPassiveWatch, drawWatch, getActiveUpdateResolution, getDrawable, getTime, isAnimatingFromPreview, isDisplayActive, setDisplayActive, setDrawable, shouldDrawPassiveComplications, use24HourTime |
Methods inherited from class android.widget.RelativeLayout |
---|
checkLayoutParams, dispatchPopulateAccessibilityEvent, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getBaseline, onLayout, onMeasure, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface android.view.ViewParent |
---|
createContextMenu, getParent, isLayoutRequested |
Field Detail |
---|
public static final int DRAW_HOUR1_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_HOUR2_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE1_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE2_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SPACER_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SEPARATOR_ON_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SEPARATOR_OFF_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_HOUR1_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_HOUR2_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE1_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE2_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SPACER_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SEPARATOR_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_FACE
BaseWatchView.setDrawable(int, int)
,
Constant Field ValuesConstructor Detail |
---|
public DigitalWatchView(Context context, AttributeSet attrs)
context
- The Context
.attrs
- The AttributeSet
.Method Detail |
---|
public void setDrawable(int tag, Drawable drawable)
BaseWatchView
The following example sets the BaseWatchView.DRAW_BACKGROUND_PASSIVE
watchface asset to the color black:
setDrawable(BaseWatchView.DRAW_BACKGROUND_PASSIVE, new ColorDrawable(Color.BLACK));
setDrawable
in class BaseWatchView
tag
- The asset constant.drawable
- The drawable.public void setTransitionType(DigitalWatchView.NumberTransition transitionType)
DigitalWatchView.NumberTransition
).
transitionType
- The new transition type.
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |