|
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.AnalogWatchView
public class AnalogWatchView
The AnalogWatchView
class extends BaseWatchView
to create an analog type watchface.
The constant variables for this class draw the watchface and associated assets in active and passive mode.
Note: See the Watchface Tutorial for more information about developing watchfaces.
Nested Class Summary | |
---|---|
static class |
AnalogWatchView.SecondHandMovement
The SecondHandMovement class provides watchface hand movement for setSecondHandMovementType(com.wimm.framework.watches.AnalogWatchView.SecondHandMovement) . |
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_ACTIVE
Tag for the watchface asset in active mode. |
static int |
DRAW_FACE_PASSIVE
Tag for the watchface asset in passive mode. |
static int |
DRAW_HOUR_ACTIVE
Tag for the watchface hour hand asset in active mode. |
static int |
DRAW_HOUR_PASSIVE
Tag for the watchface hour hand asset in passive mode. |
static int |
DRAW_MINUTE_ACTIVE
Tag for the watchface minute hand asset in active mode. |
static int |
DRAW_MINUTE_PASSIVE
Tag for the watchface minute hand asset in passive mode. |
static int |
DRAW_PIN_ACTIVE
Tag for the watchface pin asset in active mode. |
static int |
DRAW_PIN_PASSIVE
Tag for the watchface pin asset in passive mode. |
static int |
DRAW_SECOND_ACTIVE
Tag for the watchface second hand asset in active 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 | |
---|---|
AnalogWatchView(Context context,
AttributeSet attrs)
Instantiates a new analog watch view. |
Methods inherited from class com.wimm.framework.watches.BaseWatchView |
---|
animateFromPreview, drawComplications, getActiveUpdateResolution, getDrawable, getTime, isAnimatingFromPreview, isDisplayActive, setDisplayActive, setDrawable, 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_FACE_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_PIN_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_HOUR_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_SECOND_ACTIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_FACE_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_PIN_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_HOUR_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field Valuespublic static final int DRAW_MINUTE_PASSIVE
BaseWatchView.setDrawable(int, int)
,
Constant Field ValuesConstructor Detail |
---|
public AnalogWatchView(Context context, AttributeSet attrs)
context
- The Context
.attrs
- The AttributeSet
.Method Detail |
---|
public void setSecondHandMovementType(AnalogWatchView.SecondHandMovement movement)
movement
- The new AnalogWatchView.SecondHandMovement
value.protected void drawWatch(Canvas canvas, Time time)
Draw the watch face onto the given canvas set to the given time. This is called just before
the view should render its content (View.onDraw(android.graphics.Canvas)
will be call next).
This is called at a frequency of once every BaseWatchView.UpdateResolution.MINUTE
or once every
BaseWatchView.UpdateResolution.SECOND
determined by the return value of BaseWatchView.getActiveUpdateResolution()
in active mode.
drawWatch
in class BaseWatchView
protected void drawPassiveWatch(Canvas canvas, Time time)
Draw the passive watchface on the given canvas set to the given time. This is called just before
the view should render its content (View.onDraw(android.graphics.Canvas)
will be call next). This is
called at least once every 60 seconds when the device is in Passive mode.
drawPassiveWatch
in class BaseWatchView
protected void drawFace(Canvas canvas, Time time)
Called by drawWatch(android.graphics.Canvas, android.text.format.Time)
and drawPassiveWatch(android.graphics.Canvas, android.text.format.Time)
to drawn the watch background
protected void drawHour(Canvas canvas, Time time)
Called by drawWatch(android.graphics.Canvas, android.text.format.Time)
and drawPassiveWatch(android.graphics.Canvas, android.text.format.Time)
to drawn the hour hand.
protected void drawMinute(Canvas canvas, Time time)
Called by drawWatch(android.graphics.Canvas, android.text.format.Time)
and drawPassiveWatch(android.graphics.Canvas, android.text.format.Time)
to drawn the minute hand.
protected void drawSecond(Canvas canvas, Time time)
Called by drawWatch(android.graphics.Canvas, android.text.format.Time)
and drawPassiveWatch(android.graphics.Canvas, android.text.format.Time)
to drawn the second hand.
protected void drawPin(Canvas canvas, Time time)
Called by drawWatch(android.graphics.Canvas, android.text.format.Time)
and drawPassiveWatch(android.graphics.Canvas, android.text.format.Time)
to drawn the second pin.
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |