- 語法:
<uses-configuration android:reqFiveWayNav=["true" | "false"] android:reqHardKeyboard=["true" | "false"] android:reqKeyboardType=["undefined" | "nokeys" | "qwerty" | "twelvekey"] android:reqNavigation=["undefined" | "nonav" | "dpad" | "trackball" | "wheel"] android:reqTouchScreen=["undefined" | "notouch" | "stylus" | "finger"] />
- 包含於:
<manifest>
- 說明:
指出應用程式所需的硬體和軟體功能。 例如,應用程式可能會指定需要使用實體鍵盤 或特定瀏覽裝置,像是軌跡球規格為 避免將應用程式安裝在不適用的裝置上
注意:大多數應用程式都不會使用這個資訊清單標記。 請一律支援使用方向鍵 (D-Pad) 輸入,協助視障人士 使用者和支援提供 D-pad 輸入的裝置,而非觸控功能。
適用對象 如要瞭解如何在應用程式中支援 D-pad 輸入,請參閱「處理控制器動作」。如果 沒有觸控螢幕的應用程式就無法正常運作,請改用
<uses-feature>
標記: 宣告所需的觸控螢幕類型,範圍從"android.hardware.faketouch"
到基本 適用於更進階觸控類型的觸控類型事件,例如使用多指輸入不同輸入方式的"android.hardware.touchscreen.multitouch.jazzhand"
。- 屬性:
android:reqFiveWayNav
- 指出應用程式是否需要五向瀏覽控制項。是
"true"
表示需要,"false"
表示不包含。五音路 可將選取範圍上移、下、右或左移動 也提供叫用目前選項的方法可以是 方向鍵 (D-Pad)、軌跡球或其他裝置。如果應用程式需要方向控制項,而非 則可將這項屬性設為
"true"
並忽略reqNavigation
屬性。不過 如果 Pod 需要特定類型的方向控制項,則可忽略 ,並改為設定reqNavigation
。 android:reqHardKeyboard
- 應用程式是否需要實體鍵盤。是
"true"
表示需要,"false"
表示不包含。 android:reqKeyboardType
- 應用程式所需的鍵盤類型 (如果有的話)。
這個屬性不會區分硬體和軟體
鍵盤。如果需要特定類型的實體鍵盤
請在這裡指定類型,同時設定
reqHardKeyboard
屬性 至"true"
。這個值必須是下列任一字串:
值 說明 「 undefined
」應用程式不需使用鍵盤。 未定義鍵盤要求。 這是預設值。 「 nokeys
」應用程式不需使用鍵盤。 「 qwerty
」應用程式需使用標準 QWERTY 鍵盤。 「 twelvekey
」應用程式需要十二鍵撥號鍵盤,就像 電話,具備 0
到 數字的按鍵9
鍵,加上星號 (*
) 和井字鍵 (#
)。 android:reqNavigation
- 應用程式所需的瀏覽裝置 (如果有的話)。這個鍵
必須是下列任一字串:
值 說明 「 undefined
」應用程式不需任何類型的瀏覽控制項。 未定義瀏覽要求。 這是預設值。 「 nonav
」應用程式不需要瀏覽控制項。 「 dpad
」應用程式需要使用 D-Pad 進行瀏覽。 「 trackball
」應用程式需要使用軌跡球進行瀏覽。 「 wheel
」應用程式需要使用瀏覽滾輪。 如果應用程式需要瀏覽控制項,但確切的類型為 但您可以決定 將「
reqFiveWayNav
」屬性設為「"true"
」 不必設定這個目標 android:reqTouchScreen
- 應用程式所需的觸控螢幕類型 (如果有的話)。
這個值必須是下列任一字串:
值 說明 「 undefined
」應用程式不需要使用觸控螢幕。 未定義觸控螢幕要求。 這是預設值。 「 notouch
」應用程式不需要使用觸控螢幕。 「 stylus
」應用程式需要有使用觸控筆操作的觸控螢幕。 「 finger
」應用程式需要有使用手指操作的觸控螢幕。 注意:如果應用程式需要特定類型的觸控輸入, 請改用
<uses-feature>
標記,用於宣告必要的觸控螢幕 類型,從"android.hardware.faketouch"
開始用於基本的觸控樣式事件。
- 導入版本:
- API 級別 3
- 另請參閱:
<uses-configuration> (<uses-configuration>)
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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,["# <uses-configuration\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cuses-configuration\n android:reqFiveWayNav=[\"true\" | \"false\"]\n android:reqHardKeyboard=[\"true\" | \"false\"]\n android:reqKeyboardType=[\"undefined\" | \"nokeys\" | \"qwerty\" | \"twelvekey\"]\n android:reqNavigation=[\"undefined\" | \"nonav\" | \"dpad\" | \"trackball\" | \"wheel\"]\n android:reqTouchScreen=[\"undefined\" | \"notouch\" | \"stylus\" | \"finger\"] /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n\n: Indicates the hardware and software features the application requires.\n For example, an application might specify that it requires a physical keyboard\n or a particular navigation device, like a trackball. The specification is\n used to avoid installing the application on devices where it doesn't work.\n\n **Note:** Most apps don't use this manifest tag.\n *Always* support input with a directional pad (D-pad) to assist sight-impaired\n users and support devices that provide D-pad input in addition to or instead of touch.\n\n For\n information about how to support D-pad input in your app, read [Handle controller actions](/develop/ui/views/touch-and-input/game-controllers/controller-input). If\n your app absolutely can't function without a touchscreen, then instead use the [`\u003cuses-feature\u003e`](/guide/topics/manifest/uses-feature-element) tag to\n declare the required touchscreen type, ranging from `\"android.hardware.faketouch\"` for basic\n touch-style events to more advanced touch types such as `\"android.hardware.touchscreen.multitouch.jazzhand\"` for distinct input from multiple fingers.\n\nattributes:\n:\n\n `android:reqFiveWayNav`\n : Whether the application requires a five-way navigation control. It's\n `\"true\"` if it does, and `\"false\"` if not. A five-way\n control is one that can move the selection up, down, right, or left, and\n also provides a way of invoking the current selection. It can be a\n directional pad (D-pad), trackball, or other device.\n\n\n If an application requires a directional control, but not a control of a\n particular type, it can set this attribute to `\"true\"` and ignore\n the [reqNavigation](#nav) attribute. However,\n if it requires a particular type of directional control, it can ignore\n this attribute and set `reqNavigation` instead.\n\n `android:reqHardKeyboard`\n : Whether the application requires a hardware keyboard. It's\n `\"true\"` if it does, and `\"false\"` if not.\n\n `android:reqKeyboardType`\n : The type of keyboard the application requires, if any.\n This attribute doesn't distinguish between hardware and software\n keyboards. If a hardware keyboard of a certain type is required,\n specify the type here and also set the `reqHardKeyboard` attribute\n to `\"true\"`.\n\n\n The value must be one of the following strings:\n\n\n | Value | Description |\n |---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require a keyboard. A keyboard requirement isn't defined. This is the default value. |\n | \"`nokeys`\" | The application doesn't require a keyboard. |\n | \"`qwerty`\" | The application requires a standard QWERTY keyboard. |\n | \"`twelvekey`\" | The application requires a twelve-key keypad, like those on most phones, with keys for the digits from `0` through `9`, plus star (`*`) and pound (`#`) keys. |\n\n `android:reqNavigation`\n : The navigation device required by the application, if any. The value\n must be one of the following strings:\n\n | Value | Description |\n |---------------|--------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require any type of navigation control. The navigation requirement isn't defined. This is the default value. |\n | \"`nonav`\" | The application doesn't require a navigation control. |\n | \"`dpad`\" | The application requires a D-pad for navigation. |\n | \"`trackball`\" | The application requires a trackball for navigation. |\n | \"`wheel`\" | The application requires a navigation wheel. |\n\n\n If an application requires a navigational control, but the exact type of\n control doesn't matter, it can set the\n [reqFiveWayNav](#five) attribute to `\"true\"`\n rather than setting this one.\n\n `android:reqTouchScreen`\n : The type of touch screen the application requires, if any.\n The value must be one of the following strings:\n\n | Value | Description |\n |---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require a touch screen. The touch screen requirement is undefined. This is the default value. |\n | \"`notouch`\" | The application doesn't require a touch screen. |\n | \"`stylus`\" | The application requires a touch screen that is operated with a stylus. |\n | \"`finger`\" | The application requires a touch screen that is operated with a finger. **Note:** If some type of touch input is required for your app, instead use the [`\u003cuses-feature\u003e`](/guide/topics/manifest/uses-feature-element) tag to declare the required touchscreen type, beginning with `\"android.hardware.faketouch\"` for basic touch-style events. |\n\nintroduced in:\n: API level 3\n\nsee also:\n:\n - [configChanges](/guide/topics/manifest/activity-element#config) attribute of the [\u003cactivity\u003e](/guide/topics/manifest/activity-element) element\n - [ConfigurationInfo](/reference/android/content/pm/ConfigurationInfo)"]]