Most visited

Recently visited

Added in API level 3

UserDictionary.Words

public static class UserDictionary.Words
extends Object implements BaseColumns

java.lang.Object
   ↳ android.provider.UserDictionary.Words


包含用户定义的单词。

Summary

Constants

String APP_ID

插入单词的应用程序的uid。

String CONTENT_ITEM_TYPE

一个 CONTENT_URI子目录的MIME类型。

String CONTENT_TYPE

提供单词目录的MIME类型 CONTENT_URI 。

String DEFAULT_SORT_ORDER

按频率降序排序。

String FREQUENCY

频率栏。

String LOCALE

此单词所属的语言环境。

int LOCALE_TYPE_ALL

此常数在API级别16中已弃用。请使用addWord(Context, String, int, String, Locale) 。

int LOCALE_TYPE_CURRENT

此常数在API级别16中已弃用。请使用addWord(Context, String, int, String, Locale) 。

String SHORTCUT

这个词的可选快捷键。

String WORD

单词栏。

String _ID

Inherited constants

From interface android.provider.BaseColumns

Fields

public static final Uri CONTENT_URI

此表格的内容://样式网址

Public constructors

UserDictionary.Words()

Public methods

static void addWord(Context context, String word, int frequency, int localeType)

此方法在API级别16中已弃用。请改为使用addWord(Context, String, int, String, Locale) 。

static void addWord(Context context, String word, int frequency, String shortcut, Locale locale)

用给定的频率和指定的区域设置类型向字典添加一个单词。

Inherited methods

From class java.lang.Object

Constants

APP_ID

Added in API level 3
String APP_ID

插入单词的应用程序的uid。

TYPE:INTEGER

常数值:“appid”

CONTENT_ITEM_TYPE

Added in API level 3
String CONTENT_ITEM_TYPE

一个 CONTENT_URI子目录的MIME类型。

常量值:“vnd.android.cursor.item / vnd.google.userword”

CONTENT_TYPE

Added in API level 3
String CONTENT_TYPE

提供单词目录的MIME类型 CONTENT_URI 。

常量值:“vnd.android.cursor.dir / vnd.google.userword”

DEFAULT_SORT_ORDER

Added in API level 3
String DEFAULT_SORT_ORDER

按频率降序排序。

常数值:“频率降低”

FREQUENCY

Added in API level 3
String FREQUENCY

频率栏。 一个介于1和255之间的值。较高的值意味着较高的频率。

TYPE:INTEGER

常数值:“频率”

LOCALE

Added in API level 3
String LOCALE

此单词所属的语言环境。 如果它属于所有语言环境,则为空。 区域设置由Locale.toString()返回的字符串定义。

类型:文字

常量值:“locale”

LOCALE_TYPE_ALL

Added in API level 3
int LOCALE_TYPE_ALL

此常数在API级别16中已弃用。
使用addWord(Context, String, int, String, Locale) 。

常量值:0(0x00000000)

LOCALE_TYPE_CURRENT

Added in API level 3
int LOCALE_TYPE_CURRENT

此常数在API级别16中已弃用。
使用addWord(Context, String, int, String, Locale) 。

常数值:1(0x00000001)

SHORTCUT

Added in API level 16
String SHORTCUT

这个词的可选快捷键。 当键入快捷方式时,支持IME应该将该行中的单词建议为替代拼写。

常数值:“快捷键”

WORD

Added in API level 3
String WORD

单词栏。

类型:文字

常数值:“单词”

_ID

Added in API level 3
String _ID

常量值:“_id”

Fields

CONTENT_URI

Added in API level 3
Uri CONTENT_URI

此表格的内容://样式网址

Public constructors

UserDictionary.Words

Added in API level 3
UserDictionary.Words ()

Public methods

addWord

Added in API level 3
void addWord (Context context, 
                String word, 
                int frequency, 
                int localeType)

此方法在API级别16中已被弃用。
请改用addWord(Context, String, int, String, Locale) 。

用给定的频率和指定的指定语言环境类型向字典中添加一个单词。

Parameters
context Context: the current application context
word String: the word to add to the dictionary. This should not be null or empty.
frequency int
localeType int: the locale type for this word. It should be one of LOCALE_TYPE_ALL or LOCALE_TYPE_CURRENT.

addWord

Added in API level 16
void addWord (Context context, 
                String word, 
                int frequency, 
                String shortcut, 
                Locale locale)

用给定的频率和指定的区域设置类型向字典添加一个单词。

Parameters
context Context: the current application context
word String: the word to add to the dictionary. This should not be null or empty.
frequency int
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.

Hooray!