適合數十億使用者的使用者介面與內容
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
請確保應用程式提供互動式使用者介面,能快速回應使用者輸入內容,並在必要時彌補啟動緩慢情形。在應用程式設計時,最好結合不同語言的差異,包括提供間距、密度、順序、強調強調和用語變化,確保應用程式設計容易本地化。此外,請務必根據手機的設定,確認日期、時間和其他單位皆已國際化並顯示。
運作快速、反應靈敏的使用者介面
使用者對應用程式效能的觀感主要取決於應用程式的回應速度。舉例來說,與使用者和清晰顯示互動是高效能應用程式的兩項重要特徵。您可以在這裡找到最佳化設定和改善應用程式速度和回應速度的其他訣竅。
觸碰所有可觸控項目的意見回饋
- 觸控回應功能可為使用者介面增添觸覺回饋。您應確保應用程式在所有可觸控的元素提供觸控意見回饋,盡可能減少使用者感知的應用程式延遲時間。
-
回應式互動可針對使用者的輸入內容建立及時、合乎邏輯且賞心悅目的畫面回應,讓使用者更深入瞭解應用程式。「回應式互動」可將應用程式從資訊傳輸服務提升為透過多種視覺和觸覺回應進行通訊的體驗。
- 詳情請參閱有關自訂觸控意見回饋的 Android 訓練課程。
使用者介面應一律具備互動性
- 執行背景活動時,應用程式沒有回應,因此會緩慢,並降低使用者滿意度。無論背景活動為何,應用程式都必須提供回應式 UI。如要達到這個目標,您可以在背景執行緒中執行網路作業或任何需要繁重的作業,請盡可能讓 UI 執行緒保持閒置狀態。
- 透過單一活動指標呈現每項作業,Material Design 應用程式會在載入內容時,盡可能減少視覺上的變化。使用
載入指標避免封鎖對話方塊。
- 如果檢視畫面沒有可顯示的內容,就會出現空白狀態。可能是一份沒有任何項目的清單,或是沒有傳回任何結果的搜尋。使用啟動條件、教育內容或最適合的內容,避免空白狀態。
如果上述選項不適用,系統會顯示非互動式圖片和文字標語,告知使用者在哪些情況下會顯示什麼內容。
- 詳情請參閱「讓應用程式採用回應式設計」的 Android 訓練課程。
在低成本裝置上指定每秒 60 個影格
- 確保應用程式即使在低成本裝置上運作,也能持續快速且順暢。
- 過度繪製可能會大幅減慢應用程式速度,也就是每次傳遞像素多次繪製的像素時,就會發生這種情形。例如,您的圖片上方有一個按鈕。雖然有些過度繪製是無法避免的,但應盡量減少,確保能維持流暢的影格速率。對應用程式執行針對 GPU 過度繪製進行偵錯,確保能盡量減少。
- Android 裝置會以每秒 60 個影格 (fps) 重新整理畫面,這表示應用程式必須在約 16 毫秒內更新畫面。使用裝置端工具剖析應用程式,檢查應用程式是否低於平均 16 毫秒的平均值。
- 減少低成本裝置上的動畫或移除動畫,以減輕裝置 CPU 和 GPU 的負擔。詳情請參閱「改善版面配置效能」。
- 高效率檢視區塊階層可加快應用程式的速度,而不會增加應用程式的記憶體用量。詳情請參閱「效能與檢視區塊階層」。
在緩慢啟動應用程式時使用啟動畫面
- 啟動畫面是使用者第一次使用應用程式。在應用程式啟動時顯示空白畫布,會提升使用者對載入時間的觀感,因此建議您使用預留位置 UI 或品牌啟動畫面,縮短感知載入時間。
-
預留位置使用者介面是最順暢的啟動轉場效果,適用於應用程式啟動和應用程式內活動的轉換。
-
品牌啟動畫面提供短暫的品牌曝光,因此使用者介面能聚焦於內容。
- 要處理緩慢啟動速度,最好的方法就是不用考慮。啟動時間效能資訊可協助您縮短應用程式的啟動時間。
使用者介面最佳做法
-
質感設計是一種視覺語言,將良好設計中的經典原則與技術和科學的創新和可能性結合在一起。Material Design 提供單一的基礎系統,可讓使用者跨平台和裝置大小享有一致的體驗。請考慮使用關鍵的 Material Design 元件,讓使用者能夠以直覺化的方式瞭解應用程式的使用方式。
- Material Design 支援資料庫提供現成可用的 Material Design 元件。Android 2.1 (API 級別 7) 以上版本支援這些元件。
本地化
其他資源
如要進一步瞭解這個主題,請參閱下列其他資源:
其他主題
網誌文章
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# UI and content for billions\n\nMake sure that your app offers an interactive UI that responds quickly to user input and, if necessary, compensates for a slow launch.\nEnsure that your app is designed to be easily localized by\naccommodating the variations between languages: allow for spacing, density,\norder, emphasis, and wording variations. Also make sure that date, time, and\nother units are internationalized and displayed according to the phone's\nsettings.\n\nFast and responsive user interface\n----------------------------------\n\n\u003cbr /\u003e\n\n\nThe user's perception of app performance is formed in large part by the app's\nresponsiveness. For example, interaction with the user and a crisp display are two important\ncharacteristics of a performant app. Here you can find tips on how to optimize these and\nother aspects of an app's speed and responsiveness.\n\n### Touch feedback on all touchable items\n\n- Touch feedback adds a tactile feeling to the user interface. You should ensure your app provides touch feedback on all touchable elements to reduce the perceived app latency as much as possible.\n- [Responsive interaction](https://material.io/guidelines/motion/material-motion.html) encourages deeper exploration of an app by creating timely, logical, and delightful screen reactions to user input. Responsive interaction elevates an app from an information-delivery service to an experience that communicates using multiple visual and tactile responses.\n- For more information, see the Android training on [Customizing Touch\n Feedback](/training/material/animations#Touch).\n\n### UI should always be interactive\n\n- Apps that are unresponsive when performing background activity feel slow and reduce user satisfaction. Ensure your app always has a responsive UI regardless of any background activity. Achieve this by performing network operations or any heavy-duty operations in a background thread---keep the UI thread as idle as you can.\n- Material Design apps use minimal visual changes when loading content by representing each operation with a single activity indicator. Avoid blocking dialogs with [loading indicators](https://material.io/guidelines/components/progress-activity.html).\n- [Empty\n states](https://material.io/guidelines/patterns/empty-states.html) occur when a view has no content to show. It might be a list that has no items or a search that returns no results. Avoid empty states using starter, educational, or best match content. When these options aren't applicable display a non-interactive image and a text tagline that tell the user what they'll see when there is something to display.\n- For more information, see the Android training on [Keeping Your App\n Responsive](/training/articles/perf-anr).\n\n### Target 60 frames per second on low-cost devices\n\n- Ensure that your app always runs fast and smoothly, even on low-cost devices.\n- Overdraw can significantly slow down your app---it occurs when the pixels are being drawn more than once per pass. An example of this is when you have an image with a button placed on top of it. While some overdraw is unavoidable, it should be minimized to ensure a smooth frame rate. Perform [Debug\n GPU overdraw](/tools/performance/debug-gpu-overdraw) on your app to ensure it's minimized.\n- Android devices refresh the screen at 60 frames per second (fps), meaning your app has to update the screen within roughly 16 milliseconds. [Profile\n your app](/studio/profile/dev-options-rendering) using on-device tools to see if and when your app is not meeting this 16 ms average.\n- Reduce or remove animations on low-cost devices to lessen the burden on the device's CPU and GPU. For more information, see [Improve\n layout performance](/develop/ui/views/layout/improving-layouts).\n- An efficient view hierarchy can speed up your app without increasing the app's memory footprint. For more information, see [Performance\n and View Hierarchies.](/topic/performance/optimizing-view-hierarchies)\n\n### Use a launch screen on slow to start apps\n\n- The launch screen is a user's first experience of your application. Displaying a blank canvas while launching your app increases the perception of its loading time, so consider using a placeholder UI or a branded launch screen to reduce the perceived loading time.\n- A[placeholder UI](https://material.io/design/communication/launch-screen.html#placeholder-ui) is the most seamless launch transition, appropriate for both app launches and in-app activity transitions.\n- [Branded launch screens](/guide/topics/ui/splash-screen) provide momentary brand exposure, freeing the UI to focus on content.\n- The best way to deal with slow start speeds is not to have them. [Launch-Time Performance](/topic/performance/launch-time) provides information that may help you speed up your app's launch time.\n\nUser interface best practices\n-----------------------------\n\n- [Material Design](https://material.io/guidelines/material-design/introduction.html) is a visual language that synthesizes the classic principles of good design with the innovation and possibility of technology and science. Material Design provides a single underlying system that allows for a unified experience across platforms and device sizes. Consider using key Material Design components so that users intuitively know how to use your app.\n- Ready-to-use Material Design components are available in the [Material Design Support\n library](/topic/libraries/support-library/features#material-design). These components are supported in Android 2.1 (API level 7) and above.\n\nLocalization\n------------\n\n- Your users could be from any part of the world and their first language may not be yours. If you don't present your app in a language that your users can read, it is a missed opportunity. You should therefore localize your app for key regional languages.\n- To learn more, visit the Android training on [Supporting\n Different Languages](/training/basics/supporting-devices/languages) and see the [localization checklist](/distribute/tools/localization-checklist).\n- Starting from Android 7.0 (API level 24), the Android framework makes available a subset of the [ICU4J APIs](http://userguide.icu-project.org/), which can help you localize your app into multiple languages. For more information, see [ICU4J Android Framework APIs.](/guide/topics/resources/icu4j-framework)\n\n\u003cbr /\u003e\n\nAdditional resources\n--------------------\n\nTo learn more about this topic, view the following additional resources:\n\n### Further topics\n\n- [Keeping your app responsive](/training/articles/perf-anr)\n- [Improving layout performance](/training/improving-layouts)\n- [Introduction to animations](/training/animation/overview)\n\n### Blog posts\n\n- [Writing for global audiences](https://medium.com/google-design/writing-for-global-audiences-d339d23e9612)"]]