時間文字
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
TimeText
是會在螢幕頂端顯示目前時間的版面配置。

時間文字透過時間文字將時間顯示在畫面頂端,也可選擇是否顯示特定標籤。裝置為圓形螢幕時,時間文字為曲線呈現。裝置為矩形螢幕時,時間文字為直線呈現。
您可以在時間文字中加入其他主要的內容標籤。新增主要內容時,弧形的完整長度不得超過錶面的四分之一。
圖解
使用清單等可捲動元素建立
TimeText
時,請設計
TimeText
,在元素捲動期間淡出。您可以利用
Modifier.scrollAway
根據捲動狀態垂直捲動
TimeText
,讓畫面顯示/不顯示這類文字。
A. 主要內容
B. 分隔符號
C. 時間
使用方法
如要在地圖應用程式中顯示預計到達時間,請使用含有主要內容的時間文字,如以下範例所示。

這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Time text\n\n[`TimeText`](/reference/kotlin/androidx/wear/compose/material/package-summary#TimeText(androidx.compose.ui.Modifier,androidx.wear.compose.material.TimeSource,androidx.compose.ui.text.TextStyle,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1))\nis a layout that shows the current time at the top of the screen.\n\n**Time Text**\n\nUse time text to display the time as well as an optional label on the top\nof the screen. When the device has a round screen time text is curved.\nWhen the device has a rectangular screen, time text is straight.\n\nYou can add an additional leading content label to the time text. When\nadding leading content, the full length of the arc should not be larger\nthan a quarter of the watch face.\n\nAnatomy\n-------\n\nWhen creating `TimeText` with scrollable elements such as lists, design the `TimeText` to fade away when the element scrolls. Use [Modifier.scrollAway](/reference/kotlin/androidx/wear/compose/material/package-summary#(androidx.compose.ui.Modifier).scrollAway(androidx.compose.foundation.ScrollState,androidx.compose.ui.unit.Dp)) to scroll `TimeText` vertically in and out of view, based on the scroll state.\n\n\n**A. Leading content\nB. Separator\nC. Time**\n\nUsage\n-----\n\nTo show the estimated time of arrival in a maps app, use time text with leading\ncontent as shown in the following example."]]