ข้อความเวลา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TimeText
เป็นเลย์เอาต์ที่แสดงเวลาปัจจุบันที่ด้านบนของหน้าจอ

ข้อความระบุเวลา
ใช้ข้อความเวลาเพื่อแสดงเวลาและป้ายกำกับ (ไม่บังคับ) ที่ด้านบนของหน้าจอ เมื่ออุปกรณ์มีเวลาอยู่หน้าจอแบบกลม ข้อความจะโค้ง
เมื่ออุปกรณ์มีหน้าจอสี่เหลี่ยมผืนผ้า ข้อความเวลาจะตรง
คุณสามารถเพิ่มป้ายกำกับเนื้อหานำหน้าเพิ่มเติมลงในข้อความเวลาได้ เมื่อเพิ่มเนื้อหานำ ความยาวทั้งหมดของส่วนโค้งไม่ควรใหญ่กว่า 1 ใน 4 ของหน้าปัด
กายวิภาคศาสตร์
เมื่อสร้าง
TimeText
ที่มีองค์ประกอบที่เลื่อนได้ เช่น รายการ ให้ออกแบบ
TimeText
ให้ค่อยๆ จางหายไปเมื่อองค์ประกอบเลื่อน ใช้
Modifier.scrollAway
เพื่อเลื่อน
TimeText
ในแนวตั้งเข้าและออกจากมุมมอง โดยอิงตามสถานะการเลื่อน
ก. เนื้อหาที่โดดเด่น
ข. ตัวแบ่ง
ค. เวลา
การใช้งาน
หากต้องการแสดงเวลาถึงโดยประมาณในแอปแผนที่ ให้ใช้ข้อความเวลาที่มีเนื้อหานำหน้าตามที่แสดงในตัวอย่างต่อไปนี้

ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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."]]