Android 11부터는 시스템이 추천을 메뉴에 표시하는 대신 키보드 및 기타 입력 방식 편집기(IME)가 자동 완성 추천을 인라인, 추천란 또는 유사한 요소에 표시할 수 있습니다. 이러한 자동 완성 추천에는 비밀번호 또는 신용카드 정보와 같은 개인 비공개 데이터가 포함될 수 있으므로 추천은 사용자가 선택할 때까지 IME에서 숨겨집니다. 이 기능을 사용하려면 IME 및 비밀번호 관리자와 같은 자동 완성 서비스를 업데이트하세요. IME 또는 자동 완성 서비스가 인라인 자동 완성을 지원하지 않으면 추천은 Android 11 이전 버전과 마찬가지로 메뉴에 표시됩니다.
워크플로
이 흐름에서 IME는 현재 키보드 또는 기타 입력 편집기를 의미하며 추천 제공자는 자동 완성 추천의 적절한 제공자를 의미합니다.
입력란 및 사용자 설정에 따라 추천 제공자는 플랫폼 또는 자동 완성 서비스일 수 있습니다.
사용자는 비밀번호 또는 신용카드 입력란과 같이 자동 완성을 트리거하는 입력란에 집중합니다.
플랫폼은 현재 IME 및 적절한 추천 제공자를 쿼리하여 IME 및 추천 제공자가 인라인 자동 완성을 지원하는지 확인합니다. IME 또는 추천 제공자가 인라인 자동 완성을 지원하지 않는다면 추천은 Android 10 이하에서와 같이 메뉴에 표시됩니다.
플랫폼은 IME에 추천 요청을 제공하도록 요청합니다. 이 추천 요청은 표시할 최대 추천 수를 지정하며 각 추천의 표시 사양도 제공합니다. 표시 사양은 최대 크기, 텍스트 크기, 색상, 글꼴 데이터와 같은 항목을 지정하여 추천 제공자가 IME의 디자인과 분위기를 일치시킬 수 있도록 합니다.
플랫폼은 추천 제공자에게 요청된 추천 수까지 제공하도록 요청합니다. 각 추천에는 추천의 UI가 포함된 View를 확장하는 콜백이 포함되어 있습니다.
플랫폼은 추천이 준비되었음을 IME에 알립니다. IME는 콜백 메서드를 호출하여 각 추천의 View를 확장함으로써 추천을 표시합니다. 사용자의 비공개 정보를 보호하기 위해 IME는 이 단계에서 추천 항목을 확인하지 않습니다.
사용자가 추천 중 하나를 선택하면 사용자가 시스템 메뉴에서 추천을 선택했을 때와 동일한 방식으로 IME에 알려집니다.
다음 섹션에서는 인라인 자동 완성을 지원하도록 IME 또는 자동 완성 서비스를 구성하는 방법을 설명합니다.
인라인 자동 완성을 지원하도록 IME 구성
이 섹션에서는 인라인 자동 완성을 지원하도록 IME를 구성하는 방법을 설명합니다. IME가 인라인 자동 완성을 지원하지 않는다면 플랫폼은 기본적으로 메뉴에 자동 완성 추천을 표시합니다.
IME에 자동 완성 추천이 필요할 때 플랫폼은 Android 11 미만 버전에서와 마찬가지로 자동 완성 서비스의 onFillRequest() 메서드를 호출합니다. 그러나 서비스는 전달된 FillRequest 객체의 getInlineSuggestionsRequest() 메서드를 호출하여 IME에 의해 생성된 InlineSuggestionsRequest를 가져와야 합니다. InlineSuggestionsRequest는 필요한 인라인 추천 수와 각 추천의 표시 방식을 지정합니다. IME가 인라인 추천을 지원하지 않으면 메서드는 null을 반환합니다.
자동 완성 서비스는 InlineSuggestionsRequest에 요청된 최대 개수까지 InlinePresentation 객체를 만듭니다.
표시 사양은 InlineSuggestionsRequest에서 지정한 크기 제한을 준수해야 합니다. 추천을 IME에 반환하려면 각 추천에 대해 Dataset.Builder.setValue()를 한 번씩 호출합니다. Android 11에서는 인라인 추천을 지원하기 위해 Dataset.Builder.setValue() 버전을 제공합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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,["Beginning in Android 11, keyboards and other input-method editors\n(*IMEs* ) can display autofill suggestions inline, in a suggestion strip, or\nsomething similar instead of the system displaying suggestions in a menu. Since\nthese autofill suggestions can contain private data, such as passwords or\ncredit-card information, the suggestions are hidden from the IME until the user\nselects one. Update IMEs and autofill services, such as password managers, to\nmake use of this feature. If an IME or a autofill service doesn't support inline\nautofill, suggestions are shown in a menu, as in [versions earlier than\nAndroid 11](/guide/topics/text/autofill#guides).\n\nWorkflow\n\nIn this flow, *IME* means the current keyboard or other input editor, and\n*suggestion provider* means the appropriate provider of the autofill suggestion.\nDepending on the input field and the user's settings, the suggestion provider\nmight be the platform or an autofill service.\n\n1. The user focuses on an input field that triggers autofill, like a password or\n credit-card input field.\n\n2. The platform queries the current IME and the appropriate suggestion provider\n to see whether they support inline autofill. If either the IME or the\n suggestion provider doesn't support inline autofill, the suggestion is shown\n in a menu, as on Android 10 and lower.\n\n3. The platform asks the IME to provide a *suggestion request* . This suggestion\n request specifies the maximum number of suggestions to be displayed and also\n provides *presentation specs* for each suggestion. The presentation specs\n specify things like maximum size, text size, colors, and font data, letting\n the suggestion provider match the look and feel of the IME.\n\n4. The platform asks the suggestion provider to provide up to the requested\n number of suggestions. Each suggestion includes a callback to inflate a\n `View` containing the suggestion's UI.\n\n5. The platform informs the IME that suggestions are ready. The IME displays\n the suggestions by calling the callback method to inflate each suggestion's\n `View`. To protect the user's private information, the IME does *not* see\n what the suggestions are at this stage.\n\n6. If the user selects one of the suggestions, the IME is informed the same way\n as if the user picks a suggestion from a system menu.\n\nThe following sections describe how to configure your IME or autofill service to\nsupport inline autofill.\n\nConfigure IMEs to support inline autofill\n\nThis section describes how to configure your IME to support inline autofill. If\nyour IME doesn't support inline autofill, the platform defaults to showing\nautofill suggestions in a menu.\n\nYour IME must [set the `supportsInlinedSuggestions` attribute to\n`true`](/guide/topics/text/creating-input-method): \n\n \u003cinput-method\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:supportsInlineSuggestions=\"true\"/\u003e\n\nWhen the platform needs an autofill suggestion, it calls your IME's\n[`InputMethodService.onCreateInlineSuggestionsRequest()`](/reference/android/inputmethodservice/InputMethodService#onCreateInlineSuggestionsRequest(android.os.Bundle))\nmethod. You must implement this method. Return an\n[`InlineSuggestionsRequest`](/reference/android/view/inputmethod/InlineSuggestionsRequest)\nspecifying the following:\n\n- How many suggestions your IME wants.\n- An\n [`InlinePresentationSpec`](/reference/android/widget/inline/InlinePresentationSpec)\n for each suggestion, defining how the suggestion must be presented.\n\n | **Note:** If you provide fewer presentation specs than the number of suggestions requested, the last spec is used for all the excess suggestions. This means, for example, that if you provide only a single presentation spec, the suggestion provider uses that spec for all the suggestions.\n\nWhen the platform has suggestions, it calls your IME's\n[`onInlineSuggestionsResponse()`](/reference/android/inputmethodservice/InputMethodService#onInlineSuggestionsResponse(android.view.inputmethod.InlineSuggestionsResponse))\nmethod, passing an\n[`InlineSuggestionsResponse`](/reference/android/view/inputmethod/InlineSuggestionsResponse)\ncontaining the suggestions. You must implement this method. In your\nimplementation, call\n[`InlineSuggestionsResponse.getInlineSuggestions()`](/reference/android/view/inputmethod/InlineSuggestionsResponse#getInlineSuggestions())\nto get the list of suggestions, then inflate each suggestion by calling its\n[`InlineSuggestion.inflate()`](/reference/android/view/inputmethod/InlineSuggestion#inflate(android.content.Context,%20android.util.Size,%20java.util.concurrent.Executor,%20java.util.function.Consumer%3Candroid.widget.inline.InlineContentView%3E))\nmethod.\n\nConfigure autofill services to support inline autofill\n\nThis section describes how to configure your autofill service to support inline\nautofill. If your app doesn't support inline autofill, the platform defaults to\nshowing its autofill suggestions in a menu.\n\nYour autofill service must [set the `supportsInlinedSuggestions` attribute to\n`true`](/guide/topics/text/autofill-services): \n\n \u003cautofill-service\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:supportsInlineSuggestions=\"true\"/\u003e\n\nWhen the IME needs autofill suggestions, the platform calls your autofill\nservice's\n[`onFillRequest()`](/reference/android/service/autofill/AutofillService#onFillRequest(android.service.autofill.FillRequest,%20android.os.CancellationSignal,%20android.service.autofill.FillCallback))\nmethod, just as it does in versions below Android 11. However, your\nservice must call the passed `FillRequest` object's\n[`getInlineSuggestionsRequest()`](/reference/android/service/autofill/FillRequest#getInlineSuggestionsRequest())\nmethod to get the `InlineSuggestionsRequest` created by the IME. The\n`InlineSuggestionsRequest` specifies how many inline suggestions are needed and\nhow each one must be presented. If the IME doesn't support inline suggestions,\nthe method returns `null`.\n\nYour autofill service creates\n[`InlinePresentation`](/reference/android/service/autofill/InlinePresentation)\nobjects, up to the maximum number requested in the `InlineSuggestionsRequest`.\nYour presentations must obey the size constraints specified by the\n`InlineSuggestionsRequest`. To return your suggestions to the IME, call\n[`Dataset.Builder.setValue()`](/reference/android/service/autofill/Dataset.Builder#setValue(android.view.autofill.AutofillId,%20android.view.autofill.AutofillValue,%20java.util.regex.Pattern,%20android.widget.RemoteViews,%20android.service.autofill.InlinePresentation))\nonce for each suggestion. Android 11 provides versions of\n`Dataset.Builder.setValue()` to support inline suggestions.\n| **Note:** Although the IME is supposed to use the suggestions your service provides, this function isn't guaranteed."]]