NativeVoiceTextEditBox
NativeVoiceTextEditBox extends TextEditBox with Roku VoiceTextEditBox
dictation fields and native SceneGraph focus.
NativeVoiceTextEditBox({
id: 'search',
text: this.query,
placeholderText: 'Search',
hintText: 'Search',
voiceEnabled: true,
voiceEntryType: 'generic',
})
.onTextChange((event) => {
this.query = event.text ?? '';
})
.onDictatingChange((event) => {
this.isDictating = event.isDictating === true;
});
In addition to TextEditBox fields, it exposes placeholderText,
voiceEnabled, voiceEntryType, voiceInputRegexFilter, and
onDictatingChange. It inherits backgroundUri, text styling, cursor state,
and onTextChange from TextEditBox. Its default size is 400×50.
Use the usual Hosanna focus APIs to focus this control. Its onFocus() and
onBlur() hooks transfer focus to and from the native renderer. Handle search
or save confirmation with an application action. Verify dictation on a Roku
device with a compatible voice remote.