Fixed
Status Update
Comments
jn...@google.com <jn...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c049336906a2ead7bd596a2743b7562c4c8f979e
Author: Alex Clarke <alexclarke@google.com>
Date: Tue Nov 10 17:39:22 2020
Add a tap listener to WatchFace
Bug: 172721168
Test: Presubmit
Relnote: Added WatchFace.TapListener which allows taps not consumed by complications to be observed by the WatchFace.
Change-Id: Ic2fe1b967acc321e459f560a298ad98206a431ab
M wear/wear-watchface/api/current.txt
M wear/wear-watchface/api/public_plus_experimental_current.txt
M wear/wear-watchface/api/restricted_current.txt
M wear/wear-watchface/src/main/java/androidx/wear/watchface/WatchFace.kt
M wear/wear-watchface/src/test/java/androidx/wear/watchface/TestCommon.kt
M wear/wear-watchface/src/test/java/androidx/wear/watchface/WatchFaceServiceTest.kt
https://android-review.googlesource.com/1493584
Branch: androidx-master-dev
commit c049336906a2ead7bd596a2743b7562c4c8f979e
Author: Alex Clarke <alexclarke@google.com>
Date: Tue Nov 10 17:39:22 2020
Add a tap listener to WatchFace
Bug: 172721168
Test: Presubmit
Relnote: Added WatchFace.TapListener which allows taps not consumed by complications to be observed by the WatchFace.
Change-Id: Ic2fe1b967acc321e459f560a298ad98206a431ab
M wear/wear-watchface/api/current.txt
M wear/wear-watchface/api/public_plus_experimental_current.txt
M wear/wear-watchface/api/restricted_current.txt
M wear/wear-watchface/src/main/java/androidx/wear/watchface/WatchFace.kt
M wear/wear-watchface/src/test/java/androidx/wear/watchface/TestCommon.kt
M wear/wear-watchface/src/test/java/androidx/wear/watchface/WatchFaceServiceTest.kt
Description
Component used: Wear Watchface
Version used: 1.0.0-alpha01
My watch face has the code:
I.e., tapping the background of the watchface (any spot not covered by a complication), a specific action should be taken (in my watch face's case, swapping the background from blurred to unblurred or vice versa).
However, using the new
WatchFace
API, it appears thatonTapCommand
is both internal and early returns if the tap target does not intersect with a complication, meaning there's no way to know when to trigger my logic.Please add an API for intercepting tap events that do not overlap with any complication.