在 Compose 中設計觸控和輸入方式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用者可以透過各種方式操控 Android 應用程式,例如:
- 用手指輕觸按鈕。
- 使用實體鍵盤瀏覽畫面。
- 使用螢幕小鍵盤輸入電子郵件地址。
Compose 有很多支援這些設計的內建功能,但在某些情況下,您必須自訂或擴充預設行為。在本節中,您將進一步瞭解指標輸入、焦點和互動處理方式。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[],[],null,["Users interact with Android apps in various ways. For example, they can:\n\n- Tap on a button with their finger.\n- Navigate through a screen using their physical keyboard.\n- Enter their email address using the on-screen keyboard.\n\nCompose has a lot of built-in support for these use cases, but in some scenarios\nyou need to customize or extend the default behavior. In this section, you\nlearn more about [pointer input](/develop/ui/compose/touch-input/pointer-input), [focus](/develop/ui/compose/touch-input/focus), and [handling interactions](/develop/ui/compose/touch-input/user-interactions/handling-interactions)."]]