Package com.vuzix.ultralite
Interface UltraliteSDK.ScrollingTextView
- Enclosing interface:
- UltraliteSDK
public static interface UltraliteSDK.ScrollingTextView
ScrollingTextView is used to perform optimized text drawing to the Ultralite display. Before
a ScrollingTextView can be used, the Ultralite layout should be set to SCROLL. Otherwise
ScrollingTextView methods won't do anything. Glasses control is also required for all
ScrollingTextView methods.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
This enumeration lists actions that are valid while an app has control and has selected the SCROLL layout. -
Method Summary
Modifier and TypeMethodDescriptionvoid
After requesting control to SCROLL layout and populating with image data, this sends an explicit control to the buffer behavior.void
scrollLayoutConfig
(int sliceHeight, int numSlicesVisible, int animationDurationMs, boolean autoScroll) After requesting control to SCROLL layout, this must be called to configure the image slices.void
sendScrollImage
(LVGLImage image, int slicePosition, boolean scrollFirst) After sending scrollLayoutConfig, this will set the screen content according to those configured parameters.
-
Method Details
-
scrollLayoutConfig
void scrollLayoutConfig(int sliceHeight, int numSlicesVisible, int animationDurationMs, boolean autoScroll) After requesting control to SCROLL layout, this must be called to configure the image slices.- Parameters:
sliceHeight
- The number of pixels high for each slice (all slices are the same)numSlicesVisible
- The number of slices. Min=1. Max=(SCREEN_HEIGHT/sliceHeight). Having fewer slices shown increases the animation quality.animationDurationMs
- The duration in milliseconds over which we animate text moving between positions. Value 0 indicates instantaneous movement rather than animation.autoScroll
- True will automatically scroll every animationDurationMs
-
sendScrollImage
After sending scrollLayoutConfig, this will set the screen content according to those configured parameters.- Parameters:
image
- - A image slice. Must be size SCREEN_WIDTH x sliceHeight and should contain a single line of text rendered as an image.slicePosition
- - The position from 0 (bottom) to numSlicesVisible-1 (top) to place the image.scrollFirst
- - Commonly used when not configured for autoScroll. This causes the screen buffers to rotate one position prior to updating the image data. After rotating, the bottom slice (position 0) is guaranteed empty.
-
scrollAction
After requesting control to SCROLL layout and populating with image data, this sends an explicit control to the buffer behavior.- Parameters:
action
- The action to perform- See Also:
-