am d8bd117c: Merge "docs: Add parent calls to WatchFaces snippet." into lmp-docs
* commit 'd8bd117ce017d7e9b967d7949f8ca3e661e2cd39': docs: Add parent calls to WatchFaces snippet.
This commit is contained in:
@@ -164,21 +164,25 @@ public class AnalogWatchFaceService extends CanvasWatchFaceService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(SurfaceHolder holder) {
|
public void onCreate(SurfaceHolder holder) {
|
||||||
|
super.onCreate(holder);
|
||||||
/* initialize your watch face */
|
/* initialize your watch face */
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPropertiesChanged(Bundle properties) {
|
public void onPropertiesChanged(Bundle properties) {
|
||||||
|
super.onPropertiesChanged(properties);
|
||||||
/* get device features (burn-in, low-bit ambient) */
|
/* get device features (burn-in, low-bit ambient) */
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTimeTick() {
|
public void onTimeTick() {
|
||||||
|
super.onTimeTick();
|
||||||
/* the time changed */
|
/* the time changed */
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAmbientModeChanged(boolean inAmbientMode) {
|
public void onAmbientModeChanged(boolean inAmbientMode) {
|
||||||
|
super.onAmbientModeChanged(inAmbientMode);
|
||||||
/* the wearable switched between modes */
|
/* the wearable switched between modes */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +193,7 @@ public class AnalogWatchFaceService extends CanvasWatchFaceService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onVisibilityChanged(boolean visible) {
|
public void onVisibilityChanged(boolean visible) {
|
||||||
|
super.onVisibilityChanged(visible);
|
||||||
/* the watch face became visible or invisible */
|
/* the watch face became visible or invisible */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user