public class RemoteInputConstants
extends Object
| java.lang.Object | |
| ↳ | android.support.wearable.input.RemoteInputConstants |
定制 RemoteInput实例的常量。
这些常数定义了可以添加到 RemoteInput以更改将要显示的输入选项的额外值。
例如,要创建一个允许自由格式输入的RemoteInput(例如Wear上的语音输入),但不显示Draw Emoji选项:
Bundle extras = new Bundle();
extras.putBoolean(RemoteInputConstants.EXTRA_DISALLOW_EMOJI, true);
RemoteInput remoteInput = new RemoteInput.Builder(resultKey)
.setAllowFreeFormInput(true)
.addExtras(extras)
.build();
Constants |
|
|---|---|
String |
EXTRA_DISALLOW_EMOJI 可以添加到 |
Public constructors |
|
|---|---|
RemoteInputConstants() |
|
Inherited methods |
|
|---|---|
java.lang.Object
|
|
String EXTRA_DISALLOW_EMOJI
可以添加到 RemoteInput以导致仅表情符号选项(例如“绘制表情符号”选项)的布尔额外键。
如果此额外值为true,则不会显示“绘制表情符号”选项。 如果此额外信息不存在或者没有其他值,则只要RemoteInput允许自由格式输入,就会显示“绘制表情符号”选项。
常量值:“android.support.wearable.input.extra.DISALLOW_EMOJI”
RemoteInputConstants ()