การลบล้างค่าที่กำหนดโดยผู้ผลิตอุปกรณ์หน้าจอขนาดใหญ่สำหรับแต่ละแอป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Android มีการลบล้างที่จะเปลี่ยนลักษณะการทำงานที่กำหนดค่าไว้ของแอป เช่น การลบล้าง FORCE_RESIZE_APP
จะสั่งให้ระบบปรับขนาดแอปให้พอดีกับขนาดการแสดงผล แม้ว่าจะตั้งค่า resizeableActivity="false"
ไว้ในไฟล์ Manifest ของแอปก็ตาม
ผู้ผลิตอุปกรณ์จะใช้การลบล้างกับแอปในอุปกรณ์ที่มีหน้าจอขนาดใหญ่บางรุ่น
การลบล้างต่อแอปมีจุดประสงค์เพื่อปรับปรุงประสบการณ์ของผู้ใช้ในอุปกรณ์หน้าจอขนาดใหญ่ แอปสามารถปิดใช้การลบล้างบางอย่างได้
ดูข้อมูลเพิ่มเติมเกี่ยวกับการลบล้างต่อแอปได้ที่โหมดความเข้ากันได้ของอุปกรณ์
การลบล้างของผู้ผลิตอุปกรณ์
ผู้ผลิตอุปกรณ์จะใช้การลบล้างกับแอปเพื่อปรับปรุงประสบการณ์ของผู้ใช้ในแท็บเล็ต อุปกรณ์พับได้ และอุปกรณ์หน้าจอขนาดใหญ่อื่นๆ ดูรายการการลบล้างทั้งหมดได้ที่โหมดความเข้ากันได้ของอุปกรณ์
ปิดใช้การลบล้าง
แท็ก PackageManager.Property
ช่วยให้แอปปิดใช้การลบล้างของผู้ผลิตอุปกรณ์ได้ Android 14 เปิดตัวแท็กต่อไปนี้
PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES
หากต้องการปิดใช้การลบล้าง FORCE_RESIZE_APP
และ FORCE_NON_RESIZE_APP
ให้ตั้งค่าพร็อพเพอร์ตี้เป็นเท็จในไฟล์ Manifest ของแอป
<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES"
android:value="false"/>
</application>
เพิ่มประสิทธิภาพแอปสำหรับหน้าจอขนาดใหญ่: ทำให้แอปปรับขนาดได้และใช้เลย์เอาต์ที่ตอบสนอง/ปรับเปลี่ยนตามอุปกรณ์เพื่อมอบประสบการณ์ของผู้ใช้ที่ดีที่สุดบนจอแสดงผลทุกขนาด
PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE
หากต้องการปิดใช้ OVERRIDE_MIN_ASPECT_RATIO
ให้ตั้งค่าพร็อพเพอร์ตี้เป็น false ในไฟล์ Manifest ของแอป
<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE"
android:value="false"/>
</application>
นอกจากนี้ พร็อพเพอร์ตี้ยังปิดใช้การลบล้างของผู้ผลิตอุปกรณ์ต่อไปนี้ด้วย
เพิ่มประสิทธิภาพแอปสำหรับหน้าจอขนาดใหญ่: อย่าตั้งค่าข้อจำกัดด้านสัดส่วนภาพในแอป สร้างเลย์เอาต์แอปที่รองรับขนาดหน้าจอต่างๆ และโหมดหลายหน้าต่าง
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-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-08-27 UTC"],[],[],null,["Android provides overrides that change the configured behavior of apps. For example, the [`FORCE_RESIZE_APP`](/guide/topics/large-screens/large-screen-compatibility-mode#force_resize_app) override instructs the system to resize the app to fit display dimensions even if [`resizeableActivity=\"false\"`](/guide/topics/manifest/application-element#resizeableActivity) is set in the app manifest.\n\nDevice manufacturers apply overrides to apps on select large screen devices.\n\nPer-app overrides are intended to improve the user experience on large screen devices. Apps can disable some overrides.\n\nFor more information about per-app overrides, see [Device compatibility mode](/guide/practices/device-compatibility-mode).\n| **Note:** To enable your app to provide the best user experience without relying on overrides, follow the [Large screen app quality](/docs/quality-guidelines/large-screen-app-quality) guidelines.\n\nDevice manufacturer overrides\n\nDevice manufacturers apply overrides to apps to improve the user experience on tablets, foldables, and other large screen devices. For a complete list of overrides, see [Device compatibility mode](/guide/practices/device-compatibility-mode#per-app_overrides).\n\nDisable the overrides\n\n[`PackageManager.Property`](/reference/android/content/pm/PackageManager.Property) tags enable apps to disable device manufacturer overrides. Android 14 introduces the following tags:\n\n\u003cbr /\u003e\n\n- **PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES**\n\n To disable the [`FORCE_RESIZE_APP`](/guide/topics/large-screens/large-screen-compatibility-mode#force_resize_app) and [`FORCE_NON_RESIZE_APP`](/guide/topics/large-screens/large-screen-compatibility-mode#force_non_resize_app) overrides, set the property to false in your app manifest: \n\n \u003capplication\u003e\n \u003cproperty\n android:name=\"android.window.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES\"\n android:value=\"false\"/\u003e\n \u003c/application\u003e\n\n **Optimize your app for large screens:** Make your app resizable and implement responsive/adaptive layouts for an optimal user experience on displays of all sizes.\n\n \u003cbr /\u003e\n\n- **PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE**\n\n To disable [`OVERRIDE_MIN_ASPECT_RATIO`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio), set the property to false in your app manifest: \n\n \u003capplication\u003e\n \u003cproperty\n android:name=\"android.window.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE\"\n android:value=\"false\"/\u003e\n \u003c/application\u003e\n\n The property also disables the following device manufacturer overrides:\n - [`OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio_portrait_only): Restricts configurations that force a given minimum aspect ratio for activities with portrait‑only orientation.\n - [`OVERRIDE_MIN_ASPECT_RATIO_MEDIUM`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio_medium): Sets the activity's minimum aspect ratio to a medium value (3:2).\n - [`OVERRIDE_MIN_ASPECT_RATIO_LARGE`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio_large): Sets the activity's minimum aspect ratio to a large value (16:9).\n - [`OVERRIDE_MIN_ASPECT_RATIO_TO_ALIGN_WITH_SPLIT_SCREEN`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio_to_align_with_split_screen): Enables the use of split‑screen aspect ratio. Allows an app to use all the available space in split‑screen mode, avoiding letterboxing.\n - [`OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN`](/guide/topics/large-screens/large-screen-compatibility-mode#override_min_aspect_ratio_exclude_portrait_fullscreen): Disables the minimum aspect ratio override in portrait full screen to use all available screen space.\n\n **Optimize your app for large screens:** Don't set aspect ratio restrictions in your app. Create app layouts that support different screen sizes and multi‑window mode."]]