The Watch Face Format is required for watch faces to be installed on devices with Wear OS 5 or later pre-installed and for all new watch faces published on Google Play.
Starting in January 2026, the Watch Face Format will be required for watch faces to be installed on all Wear OS devices.
Learn more about the user-facing changes in this Help Center article.
Kadranlarda dokunma kolları
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir kullanıcı, kadranınızla birçok şekilde etkileşimde bulunabilir.
Örneğin, bir kullanıcı hangi şarkının çaldığını öğrenmek veya günün programını görmek için kadrana dokunabilir. Wear OS by Google, saate yanıt veren başka bir kullanıcı arayüzü öğesi olmadığı sürece, kadranların saat yüzündeki belirli bir konumda tek dokunma hareketini kabul etmesine olanak tanır.
Etkileşimli kadranı uygulamak için önce kadran stilini
oluşturun, ardından hareket işlemeyi bu kılavuzda açıklandığı gibi uygulayın.
Dokunma etkinliklerini işleme
Kadrana yalnızca dokunma etkinlikleri verilir. Bu etkinlikler, kullanıcının parmağını ekrana koyup kaldırdığı etkinliklerdir. Kullanıcı, parmağı dokunmatik ekrandayken başka bir hareket yaparsa
diğer tüm hareketler sistem tarafından diğer işlevler için ayrıldığından, kadrana bir iptal etkinliği gönderilir.
Dokunma hareketlerini işlemek için
setTapListener()
kullanarak TapListener
ekleyin.
Kullanıcı saat yüzüne her dokunduğunda dinleyici çağrılır.
Kadran aşağıdaki dokunma etkinliklerini alır:
-
TapType.DOWN
:
kullanıcı parmağını dokunmatik ekrana koyduğunda
-
TapType.UP
:
kullanıcı, parmağını dokunmatik ekrandan kaldırdığında
-
TapType.CANCEL
:
sistem, kullanıcının dokunma dışında bir hareket yaptığını algıladığında
Bir TapType.DOWN
etkinliği ve takip eden TapType.UP
etkinliği, android.view.ViewConfiguration.getScaledTouchSlop
tarafından döndürülen değere göre dokunma olarak doğrulanır.
Sistem zaten hareketi işlediğinden, kadra TapType.CANCEL
etkinliği aldığında bir işlem tetiklemeyin.
Daha fazla bilgi için onTapEvent
inceleyin.
Kadran örnek uygulaması, kadran yapılandırmayla ilgili en iyi uygulamaları göstermektedir.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# Handle taps in watch faces\n\nA user can interact with your watch face in many ways.\nFor example, a user might tap the watch face to learn what song is currently playing or\nto see the day's agenda. Wear OS by Google lets watch faces accept\nthe single-tap gesture at a given location on the watch face, as long as there's not another\nUI element that also responds to that gesture.\n\nTo implement an interactive watch face, first construct the\nwatch face style, and then implement gesture handling as described in this guide.\n\nHandle tap events\n-----------------\n\nThe watch face is only given tap events, which are events where the user puts a finger\ndown on the screen and then lifts it. If the user performs any other\ntype of gesture while their finger is on the touchscreen, the watch face receives a\ncancel event, as all other gestures are reserved by the system for other functions.\n\n\nTo handle tap gestures, use\n[`setTapListener()`](/reference/kotlin/androidx/wear/watchface/WatchFace#setTapListener(androidx.wear.watchface.WatchFace.TapListener)) to add a\n[`TapListener`](/reference/kotlin/androidx/wear/watchface/WatchFace.TapListener).\nThe listener is called whenever the user taps on the watch face.\n\nThe watch face receives the following types of touch events:\n\n- TapType.DOWN:\n when the user puts their finger down on the touchscreen\n\n- TapType.UP:\n when the user lifts the finger from the touchscreen\n\n- TapType.CANCEL:\n when the system detects that the user performs a gesture other than a tap\n\nA\n`TapType.DOWN` event and the successive `TapType.UP`\nevent are verified as a tap according to the value returned by\n[android.view.ViewConfiguration.getScaledTouchSlop](/reference/android/view/ViewConfiguration#getScaledTouchSlop()).\n\nDon't trigger an action when the watch face receives a `TapType.CANCEL`\nevent, because the system is already processing the gesture.\n\nFor more information, see [onTapEvent](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.TapListener#onTapEvent(kotlin.Int,androidx.wear.watchface.TapEvent,androidx.wear.watchface.ComplicationSlot)).\n\nRelated resources\n-----------------\n\n\nThe\n[watch face sample app](https://github.com/android/wear-os-samples) demonstrates the best practices for configuring a watch face."]]