WindowInsetsCompat in AndroidX Core v1.5.0-alpha02

Viewed 491

With the release of WindowInsetsCompat in AndroidX Core v1.5.0-alpha02, what's the equivalent of

view.windowInsetsController?.hide(WindowInsets.Type.ime())

that does not give a @RequiresApi(R) Annotation warning?

1 Answers

Use this instead:

ViewCompat.getRootWindowInsets(view)?.isVisible(WindowInsetsCompat.Type.ime()) 
Related