Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Diego, currently computeCurrentWindowMetrics
requires a @UiContext
and will crash if the provided context cannot be unwrapped to an Activity
or InputMethodService
.
For views that are created without a UiContext, such as in a robolectric test, or when inflated using the applicationContext (for example to be added to window manager directly with WM#addView), should computeCurrentWindowMetrics implement some fallback behavior (such as size of the ViewRootImpl, or default display size)? If not then consumers of this API will need to define their own fallbacks which will lead to inconsistency
Description
The current Focus modifiers let you know if a composable is in focus. When there are multiple windows open on the screen, the user needs to know if the current window is in focus. Add an ambient to provide this information.