CanvasWatchFaceService.Engine
public class CanvasWatchFaceService.Engine
extends WatchFaceService.Engine
Canvas
的实际执行情况。 您必须实现onCreateEngine()
才能返回具体的Engine实现。
Summary
Inherited methods |
From class android.support.wearable.watchface.WatchFaceService.Engine
|
From class android.service.wallpaper.WallpaperService.Engine
void |
dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3) |
int |
getDesiredMinimumHeight() |
int |
getDesiredMinimumWidth() |
SurfaceHolder |
getSurfaceHolder() |
boolean |
isPreview() |
boolean |
isVisible() |
void |
onApplyWindowInsets(WindowInsets arg0) |
Bundle |
onCommand(String arg0, int arg1, int arg2, int arg3, Bundle arg4, boolean arg5) |
void |
onCreate(SurfaceHolder arg0) |
void |
onDesiredSizeChanged(int arg0, int arg1) |
void |
onDestroy() |
void |
onOffsetsChanged(float arg0, float arg1, float arg2, float arg3, int arg4, int arg5) |
void |
onSurfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) |
void |
onSurfaceCreated(SurfaceHolder arg0) |
void |
onSurfaceDestroyed(SurfaceHolder arg0) |
void |
onSurfaceRedrawNeeded(SurfaceHolder arg0) |
void |
onTouchEvent(MotionEvent arg0) |
void |
onVisibilityChanged(boolean arg0) |
void |
setFixedSizeAllowed(boolean arg0) |
void |
setOffsetNotificationsEnabled(boolean arg0) |
void |
setTouchEventsEnabled(boolean arg0) |
|
From class java.lang.Object
Object |
clone() |
boolean |
equals(Object arg0) |
void |
finalize() |
final Class<?> |
getClass() |
int |
hashCode() |
final void |
notify() |
final void |
notifyAll() |
String |
toString() |
final void |
wait(long arg0, int arg1) |
final void |
wait(long arg0) |
final void |
wait() |
|
Public constructors
CanvasWatchFaceService.Engine
CanvasWatchFaceService.Engine ()
Public methods
onDestroy
void onDestroy ()
onDraw
void onDraw (Canvas canvas,
Rect bounds)
绘制表盘。
Parameters |
canvas |
Canvas : the canvas to draw into |
bounds |
Rect : the bounds in which the watch face should be drawn |
onSurfaceChanged
void onSurfaceChanged (SurfaceHolder holder,
int format,
int width,
int height)
Parameters |
holder |
SurfaceHolder
|
format |
int
|
width |
int
|
height |
int
|
onSurfaceCreated
void onSurfaceCreated (SurfaceHolder holder)
Parameters |
holder |
SurfaceHolder
|
onSurfaceRedrawNeeded
void onSurfaceRedrawNeeded (SurfaceHolder holder)
Parameters |
holder |
SurfaceHolder
|