onVisibleAreaChanged

fun onVisibleAreaChanged(visibleArea: Rect)

Must be called when androidx.car.app.SurfaceCallback.onVisibleAreaChanged is triggered.


var onVisibleAreaChanged: (rect: Rect) -> Unit?

Indicates that the visible area provided by the host has changed.

The surface may be occluded for several reasons including status bar changes, overlays from other apps or dynamic UI within a template. visibleArea is the area currently guaranteed to not be occluded by any other UI. If the app needs to show critical data, it should be bounded by this area.

First param, the rectangle set to the surface area guaranteed to be visible. If Rect.isEmpty returns true for the visible area, then it is currently unknown