Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IViewModule4

interface IViewModule4
Extends IViewModule3 This interface extends IViewModule3 with additional capability to create empty text view without requiring a ITextLayout parameter.

Methods

makeEmptyTextView()

ITextView* makeEmptyTextView()
Creates a new empty ITextView object. This creates an ITextView instance without requiring an ITextLayout parameter at construction time. The text layout can be set later using ITextView::updateTextLayout method when the content becomes available. Use Cases:
  • Lazy loading scenarios where text content is fetched asynchronously
  • Performance optimization when creating multiple views upfront but populating content later
  • Dynamic UI construction where layout parameters depend on runtime conditions
Behavior:
  • The returned ITextView is in an uninitialized state until updateTextLayout() is called
  • The view will not render any text content until a layout is provided
  • The view can be added to the view hierarchy immediately, but will appear empty
  • Calling updateTextLayout() triggers layout calculation and rendering
Performance Benefits: This method reduces initial view creation overhead by deferring text measurement and layout calculations. Comparison with makeTextView(): Use IViewModule::makeTextView when the ITextLayout is immediately available. Use makeEmptyTextView() when you need to create the view first and populate content later.

Returns

ITextView* A pointer to the newly created ITextView instance with empty text.
Last modified on October 29, 2026