0

So i was watching this tutorial by google today here https://youtu.be/jal0l48OTxk and i figured that doing

        myCanvasView.systemUiVisibility = SYSTEM_UI_FLAG_FULLSCREEN

is now deprecated and i need to use windowInsetsController instead. First off, I am new to android and i don't know how to use this new thing which clearly doesn't work in the exact same way as the old API so it's not a direct replacement but rather more nuanced one. Seondly, I noticed that windowInsetsController is not backwards compatible and there is something like windowInsetsControllerCompat that exists out there. However, I am not able to access it like this:

        myCanvasView.windowInsetsControllerCompat

but

        myCanvasView.windowInsetsController

works fine. Can someone here help me out?

4

1 回答 1

0

WindowCompat.setDecorFitsSystemWindows(窗口,假)

于 2021-09-08T12:17:19.440 回答