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 IView12

interface IView12
Extends IView11 This interface extends IView11 with safe area insets queries and notifications. Like its predecessors, all methods of this interface must be called from the UI thread.

Methods

getSafeAreaInsets()

EdgeInsets getSafeAreaInsets()
Gets the safe area insets from the window. Safe area insets represent the portions of the window that are not obscured by system UI elements such as status bars, navigation bars, or device notches. Note: If the view is not attached to the view tree, this will return zeros.

Returns

EdgeInsets EdgeInsets containing the safe area insets.

setSafeAreaInsetsChangedListener()

com.amazon.apmf.ISubscription* setSafeAreaInsetsChangedListener(ISafeAreaInsetsChangedListener* safeAreaInsetsChangedListener)
Registers a listener to be notified when safe area insets change. When insets are updated at the root view, the update propagates through the view hierarchy in preorder, notifying ancestor views before their descendants. Invocation timing:
  • Invoked whenever the window’s safe area insets change.
  • To obtain the current insets, call getSafeAreaInsets().
All invocations occur on the UI thread. Calling this method again will replace the previously set listener.

Parameters

safeAreaInsetsChangedListener
ISafeAreaInsetsChangedListener* — Required ISafeAreaInsetsChangedListener.

Returns

com.amazon.apmf.ISubscription* ISubscription to cancel (remove) the listener.
Last modified on October 29, 2026