Words
open class Words : BaseColumns
| kotlin.Any | |
| ↳ | android.provider.UserDictionary.Words |
Contains the user defined words.
Summary
| Constants | |
|---|---|
| static String |
The uid of the application that inserted the word. |
| static String |
The MIME type of a |
| static String |
The MIME type of |
| static String |
Sort by descending order of frequency. |
| static String |
The frequency column. |
| static String |
The locale that this word belongs to. |
| static Int | |
| static Int | |
| static String |
An optional shortcut for this word. |
| static String |
The word column. |
| static String | |
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
Words() |
|
| Public methods | |
|---|---|
| open static Unit |
Adds a word to the dictionary, with the given frequency and the specified specified locale type. |
| open static Unit |
Adds a word to the dictionary, with the given frequency and the specified locale type. |
| Properties | |
|---|---|
| static Uri! |
The content:// style URL for this table |
Constants
APP_ID
static val APP_ID: String
The uid of the application that inserted the word.
TYPE: INTEGER
Value: "appid"CONTENT_ITEM_TYPE
static val CONTENT_ITEM_TYPE: String
The MIME type of a CONTENT_URI sub-directory of a single word.
Value: "vnd.android.cursor.item/vnd.google.userword"CONTENT_TYPE
static val CONTENT_TYPE: String
The MIME type of CONTENT_URI providing a directory of words.
Value: "vnd.android.cursor.dir/vnd.google.userword"DEFAULT_SORT_ORDER
static val DEFAULT_SORT_ORDER: String
Sort by descending order of frequency.
Value: "frequency DESC"FREQUENCY
static val FREQUENCY: String
The frequency column. A value between 1 and 255. Higher values imply higher frequency.
TYPE: INTEGER
Value: "frequency"LOCALE
static val LOCALE: String
The locale that this word belongs to. Null if it pertains to all locales. Locale is as defined by the string returned by Locale.toString().
TYPE: TEXT
Value: "locale"LOCALE_TYPE_ALL
static valLOCALE_TYPE_ALL: Int
Deprecated: Use addWord(android.content.Context,java.lang.String,int,java.lang.String,java.util.Locale).
Value: 0LOCALE_TYPE_CURRENT
static valLOCALE_TYPE_CURRENT: Int
Deprecated: Use addWord(android.content.Context,java.lang.String,int,java.lang.String,java.util.Locale).
Value: 1SHORTCUT
static val SHORTCUT: String
An optional shortcut for this word. When the shortcut is typed, supporting IMEs should suggest the word in this row as an alternate spelling too.
Value: "shortcut"Public constructors
Words
Words()
Public methods
addWord
open static funaddWord(
context: Context!,
word: String!,
frequency: Int,
localeType: Int
): Unit
Deprecated: Please use addWord(android.content.Context,java.lang.String,int,java.lang.String,java.util.Locale) instead.
Adds a word to the dictionary, with the given frequency and the specified specified locale type.
| Parameters | |
|---|---|
context |
Context!: the current application context |
word |
String!: the word to add to the dictionary. This should not be null or empty. |
localeType |
Int: the locale type for this word. It should be one of LOCALE_TYPE_ALL or LOCALE_TYPE_CURRENT. |
addWord
open static fun addWord(
context: Context!,
word: String!,
frequency: Int,
shortcut: String!,
locale: Locale!
): Unit
Adds a word to the dictionary, with the given frequency and the specified locale type.
| Parameters | |
|---|---|
context |
Context!: the current application context |
word |
String!: the word to add to the dictionary. This should not be null or empty. |
shortcut |
String!: optional shortcut spelling for this word. When the shortcut is typed, the word may be suggested by applications that support it. May be null. |
locale |
Locale!: the locale to insert the word for, or null to insert the word for all locales. |
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
The content:// style URL for this table