This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The primary goal of this CL is to enable application developers to provide more context-based language (locale) information for IME developers so that users can be benefited by more natural text input experience. As of API Level 23, there are several APIs that allow IMEs to retrieve locale/country related information. - Locale#getDefault() - Configuration#locale - LocaleSpan#getLocale() - SubscriptionInfo#getCountryIso() However, only LocaleSpan#getLocale() can be used to pass application specific languge (locale) context from applications to IMEs. Also LocaleSpan is not designed to be used per input-context. We want to have something in EditorInfo and LocaleList would be the right thing. Although default implementation of TextView#onCreateInputConnection() starts filling EditorInfo#localeList with TextView#getTextLocales() by this CL, application developers are encouraged to provide its own LocaleList when they are confident that the user want to use a certain (set) of language(s). For instance, a chat application may be able to guess what language will be used in the conversation before the user start typing. At least it should be able to remember the last used language for each conversation. Another instance would be "From" and "To" EditText fields in a translation app. Those fields should have different LocaleList based on the languages that the user want to translate from and to. Bug: 22859862 Change-Id: I77db5b99a7cf745d800db75baf135bb60ad04820
- Loading branch information
Showing
5 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters