I'm currently trying to implement edge-to-edge for an Android application and have done it successfully using this guide (https://developer.android.com/training/gestures/edge-to-edge#lay-out-in-full-screen).
But the issue here is that I want to hide the top/status bar when edge-to-edge is implemented. I tried hiding the status bar by defining <item name="android:windowFullscreen">true</item> in the main theme of the app but that pushes the contents below the top/status bar unfortunately and even adding a negative padding doesn't resolve the issue. Also, I have seen this been implemented in correctly in Google Camera (for the settings option).
So what's the right way to hide the status bar while implementing edge-to-edge (assuming we want to add clickable contents such as a button below it)?