Class VuzixBubbleDelegate
A lightweight mechanism to place bubbles on the UI to identify speech phrases
This class is an alternative to using VuzixSpeechClient
. It provides the ability
to have a spoken phrase added to a help bubbble on the user interface. When the user speaks the
associated phrase the system will act as though the user clicked that view on the screen.
This implementation may be done fully in XML, or via this class.
This mechanism provides less control than if the VuzixSpeechClient
were used, but is
very easy to implement and debug, and should not negatively affect the software when running on
other devices with no Vuzix speech engine.
Bubbles can be places in any of the 9 pre-defined location, or using a raw offset value
This is an example of customizing the bubble to be placed in the upper right corner:
myButton.setAccessibilityDelegate(new VuzixBubbleDelegate(Alignment.ALIGN_TOP_END));
- Since:
- SDK version 1.96
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Defines alignment positions for the on-screen help bubble -
Constructor Summary
ConstructorDescriptionVuzixBubbleDelegate
(int x, int y) Construct a VuzixBubbleDelegate using a raw offset.VuzixBubbleDelegate
(VuzixBubbleDelegate.Alignment alignment) Construct a VuzixBubbleDelegate and align to one of the pre-defined alignment values -
Method Summary
Modifier and TypeMethodDescriptionvoid
onInitializeAccessibilityNodeInfo
(android.view.View host, android.view.accessibility.AccessibilityNodeInfo info) This method is called by the framework and should not be called or overridden in your code.Methods inherited from class android.view.View.AccessibilityDelegate
addExtraDataToAccessibilityNodeInfo, dispatchPopulateAccessibilityEvent, getAccessibilityNodeProvider, onInitializeAccessibilityEvent, onPopulateAccessibilityEvent, onRequestSendAccessibilityEvent, performAccessibilityAction, sendAccessibilityEvent, sendAccessibilityEventUnchecked
-
Constructor Details
-
VuzixBubbleDelegate
Construct a VuzixBubbleDelegate and align to one of the pre-defined alignment values- Parameters:
alignment
- the location to place the on-screen bubble- Since:
- SDK version 1.96
-
VuzixBubbleDelegate
public VuzixBubbleDelegate(int x, int y) Construct a VuzixBubbleDelegate using a raw offset.- Parameters:
x
- the horizontal location to place the on-screen bubble, releative to the upper-left corner of the view to which the bubble is attached.y
- the vertical location to place the on-screen bubble, releative to the upper-left corner of the view to which the bubble is attached.- Since:
- SDK version 1.96
-
-
Method Details
-
onInitializeAccessibilityNodeInfo
public void onInitializeAccessibilityNodeInfo(android.view.View host, android.view.accessibility.AccessibilityNodeInfo info) This method is called by the framework and should not be called or overridden in your code.- Overrides:
onInitializeAccessibilityNodeInfo
in classandroid.view.View.AccessibilityDelegate
- See Also:
-