自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
視窗放大
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 12 推出的部分螢幕放大功能,可為低視能使用者提供更優質的觀看選項。
視力不佳的使用者可能會配戴有度數的眼鏡,或是因環境條件或疾病而暫時無法解讀螢幕畫面。過度照明或使用者極度疲勞等因素,可能會導致暫時性困難。
Android 12 的局部螢幕放大功能可讓使用者切換全螢幕放大和局部畫面放大模式。使用者可以透過部分螢幕放大功能,在螢幕上拖曳放大的部分畫面,查看不同區域。啟用放大功能時,系統會顯示切換按鈕,讓使用者切換至全螢幕放大模式。從 Android 14 開始,使用者可以選擇小、中、大或全螢幕放大鏡尺寸。
如要切換檢視畫面,請按照圖 1 所示操作:
- 在全螢幕放大模式下,輕觸「設定」圖示。
- 選取前三種放大鏡尺寸 (小、中、大) 之一。
- 輕觸 [完成]。放大鏡會變更為所選視窗的放大倍率。
圖 1. 切換按鈕,用於在檢視畫面之間切換。
開關按鈕會在五秒未使用後淡出,並在使用者再次與螢幕互動時重新顯示。使用者可以變更「設定」中的無障礙功能逾時值,延長這段時間。
使用者可在「設定」的「放大倍率」下方選取偏好設定。他們可以繼續使用一般縮放功能,並視需要在縮放和放大功能之間切換,方法是選取「選擇放大方式」下方的「在全螢幕和局部畫面之間切換」。
如要使用放大選項,請按照圖 2 所示操作:
- 在「設定」下方的「無障礙設定」選單中,選取「放大鏡」即可設定「放大鏡類型」。
- 選取「放大類型」後,預設會切換為「切換螢幕畫面全部放大或局部放大模式」。如果使用者選擇「放大畫面部分內容」,則「放大鏡大小」對話方塊中不會顯示全螢幕選項。
圖 2. 「設定」中的放大選項。
根據預設,使用者可以選擇切換這兩種模式,也可以選取「放大全螢幕畫面」選項。升級至 Android 12 的 Android 11 裝置具有局部螢幕放大功能。使用者如果擁有已升級至 Android 12 的 Android 11 裝置,也可以在兩者之間切換,但這不是預設選項。
放大變更會顯示動畫效果,如圖 3 所示。比例會逐漸增加或減少,直到達到指定的目標值為止。
圖 3. 放大動畫。
實作
OEM 廠商和合作夥伴不需要採取任何行動,即可在 Android 12 中實作部分螢幕放大功能。預設為開啟。如要停用此功能,請在 config.xml 檔案中將布林值 config_magnification_area
設為 false
,即可從設定中移除該功能。啟用後,使用者可以在「設定」中關閉,但無法移除。(當使用者在「設定」中關閉部分螢幕放大功能時,config_magnification_area
設定的 true
原始值會保留不變)。
Android 11 以下版本的局部螢幕放大功能
升級至 Android 12 的 Android 11 以下裝置可使用這項功能。如果使用者原本使用 Android 11 以下版本裝置的完整放大功能,然後升級至 Android 12,當他們首次開啟完整放大功能時,系統會顯示通知對話方塊,提醒他們可以放大部分螢幕畫面。
如果他們從未使用過全螢幕放大功能,可以依序前往「設定」>「無障礙設定」>「放大」,即可使用全螢幕和局部放大功能。
三指輕觸和無障礙功能
當使用者透過輕觸三下手勢選取局部放大功能時,系統會顯示警告對話方塊,提示使用者改用無障礙按鈕。使用者可以選取「使用三指輕觸」,但對話方塊可確保任何希望在 UI 中使用更多無障礙功能的使用者都能瞭解這項功能。無障礙按鈕可協助使用者,例如手部有顫抖症狀的使用者,他們可能不習慣三點按的方式。
圖 4. 無障礙工具按鈕對話方塊。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Window magnification\n\nPartial-screen magnification, introduced in Android 12\ngives low-vision users improved viewing options.\n\nLow-vision users might wear prescription eyeglasses, or they might have\ntemporary difficulty interpreting a display due to environmental conditions or\nillness. Temporary difficulties can be caused by things like excessive lighting\nor extreme user fatigue.\n\nThe partial-screen magnification feature in Android 12\nlets a user switch between full-screen magnification and partial-screen\nmagnification. With partial-screen magnification, Users can drag the\nmagnified partial screen around the display to view different areas. A\nswitch button that lets the user toggle to a full-screen magnification appears\nwhen magnification is activated. Starting in\nAndroid 14, users can choose between a small, medium,\nlarge, or full-screen magnifier size.\n\nTo toggle between views, do the following as shown in figure 1:\n\n1. While in full-screen magnification, tap the Settings icon.\n2. Select one of the first three magnifier sizes (small, medium, large).\n3. Tap **Done**. The magnifier changes to the selected window magnification.\n\n**Figure 1.** Switch button for toggling between views.\n\nThe switch button fades out of view after five seconds of inactivity, and\nreappears when the user interacts with the screen again. Users can extend this\nduration by changing the **[Accessibility timeout](https://support.google.com/accessibility/android/answer/9426889)**\nvalue in **Settings**.\n\nUsers select their preferences under **Magnifications** in **Settings** . They\ncan stay with the regular zoom functionality, and they can toggle between the\nzoom and magnify functions as needed by selecting **Switch between full and\npartial screen** under **Choose how to magnify**.\n\nTo use the magnification options, do the following as shown in figure 2:\n\n1. In the **Accessibility** menu under **Settings** , select **Magnification** to set the **Magnification type**.\n2. Selecting **Magnification type** defaults to **Switch between full and partial screen** . If the user chooses **Magnify part of screen** , the full screen option doesn't appear in the **Magnifier size** dialog.\n\n**Figure 2.** Magnification options in Settings.\n\nUsers have the option to switch between both by default, or they can select the\n**Magnify full screen** option. Android 11 devices that are upgraded to Android\n12 have the partial-screen magnification function. A\nuser with an Android 11 device that has been upgraded to Android 12\ncan also switch between both, but that's not a default option.\n\nThe magnification change is animated, as shown in Figure 3. The scale either\nincreases or decreases gradually until the specified target value is reached.\n\n**Figure 3.** Animation with magnification.\n\nImplementation\n--------------\n\nOEMs and partners don't need to do anything to implement the partial-screen\nmagnification feature in Android 12. It's on by\ndefault. To disable it, set the boolean `config_magnification_area` value to\n`false` in the [config.xml](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/res/res/values/config.xml)\nfile, which removes it from **Settings** . When it's enabled, Users\ncan *turn it off* in **Settings** , but they can't remove it. (When a user turns\nthe partial-screen magnification off in **Settings** , the\n`config_magnification_area` setting original value of `true` persists.)\n\n### Android 11 and lower partial screen magnification\n\nAndroid 11 and lower devices that are upgraded to\nAndroid 12 can use this feature. For users with Android\n11 or lower devices who originally used the full magnification function and\nthen upgrade to Android 12, when they turn on full\nmagnification for the first time, a notification dialog appears to remind them\nthat they can magnify part of their screen.\n\nIf they've never used full magnification they can go to **Settings** \\\u003e\n**Accessibility** \\\u003e **Magnification** to use both full and partial-screen\nmagnification.\n\n### Triple-tap and accessibility\n\nWhen users select partial-screen magnification by using a triple-tap movement, a\nwarning dialog appears that prompts them to **Switch to accessibility\nbutton** instead. They can select **Use triple-tap**, but the\ndialog ensures that anyone who wants more accessibility in the UI knows\nthat it's available. The accessibility button assists users who don't find the\ntriple-tap mechanism useful, such as those who have hand tremors.\n\n**Figure 4.** Accessibility button dialog."]]