WearHF directives
The simplest way to optimize an application for the HMT is to use WearHF directives to tell WearHF how to interpret each screen in your application.
All WearHF directives are placed in a view’s content_description attribute. Multiple WearHF directives can be used in a single android:contentDescription line by separating the commands with a pipe character. For example:
android:contentDescription="hf_no_overlay|hf_no_ptt_home"
Command | Description | Child Elements |
---|---|---|
hf_override: |
|
N/A |
hf_commands: commands |
|
N/A |
hf_add_commands: commands |
|
N/A |
hf_wearml_override |
|
N/A |
hf_no_overlay | Disables the overlay. | Yes |
hf_overlay_number | Specifies that a persistent numeric index should be displayed in the center of the element. | No |
hf_no_number | Turn off numeric indexing and text overlays (i.e. SELECT ITEM X). | Yes |
hf_yes_number | Turn on numeric indexing and text overlays. | Yes |
hf_overlay_offset | Specifies the offset for the voice command overlay. Format is hf_overlay_offset:x,y where x and y are integers specifying the offset in pixels. | No |
hf_show_text | Specifies that text overlays should be displayed. | Yes |
hf_persists | Specifies that numeric indexing overlay or text overlay should always be displayed. | Yes |
hf_orientation: option |
Specifies the orientation of the text overlay relative to the numeric index overlay. See options. | No |
hf_show_dot | Specifies that an overlay dot should be displayed to indicate a voice command. | No |
hf_show_icon | Specifies that a microphone overlay icon should be displayed next to the text overlay to indicate a voice command. | No |
hf_background_color: color |
|
No |
hf_text_color: color |
|
No |
hf_use_text |
|
Yes |
hf_use_description | Specifies that the any none WearHF directive found in the content description should be used for the voice command. | Yes |
hf_hide_help | Hides the “Show Help” icon. | N/A |
hf_text_normal |
|
No |
hf_text_dictation | Characterizes a text-field to tell WearHF present a dictation keyboard allowing the user to enter some text by freely speaking text in sentences. | No |
hf_text_barcode: option |
Characterizes a text-field to tell WearHF present a barcode scanner allowing the user to enter some text by scanning a barcode. See options. | No |
hf_scroll_none | Turn off head-tracked scrolling for the view. | No |
hf_scroll_horizontal |
|
N/A |
hf_scroll_vertical |
|
N/A |
hf_no_ptt_home |
|
N/A |
hf_no_global_commands |
|
N/A |
hf_broadcast_results |
|
N/A |
hf_make_clickable | Force the view to be clicked with a mouse click when the speech command is spoken. | No |
hf_show_help_commands: commands |
|
N/A |
Option | Description |
---|---|
qr | Limit the barcode scanner to only scan QR type barcodes. |
code128 | Limit the barcode scanner to only scan Code 128 symbology barcodes. |
upc | Limit the barcode scanner to only scan Universal Product Code symbology barcodes. |
ean | Limit the barcode scanner to only scan EAN symbology barcodes. |
any | Allow the barcode scanner to scan any supported barcode types. |
Option | Description |
---|---|
top | Display text overlay on top of the numeric index overlay. |
right | Display text overlay to the right of the numeric index overlay. |
bottom | Display text overlay underneath the numeric index overlay. |
left | Display text overlay to the left of the numeric index overlay. |