ConorOkus / uMlando-wallet

Lightning Dev Kit Android Demo Wallet
17 stars 9 forks source link

Add composable to control system bars colour and visibility #28

Closed thunderbiscuit closed 1 year ago

thunderbiscuit commented 1 year ago

This PR adds the ability to control whether the two system bars (status bar up top and navigation bar at the bottom) are visible and the colours/transparency they should have.

For now I simply made the status bar transparent so as to remove the blue stripe we had at the top, but I also added and commented out the code to change the navigation bar and show/hide either of them, just so we have the option and it's easy to change. It's a surprisingly simple little composable:

@Composable
internal fun SystemBars() {
    rememberSystemUiController().apply {
        setStatusBarColor(
            color = Color.Transparent,
            darkIcons = true
        )
        // setNavigationBarColor(
        //     color = Color.Transparent,
        //     darkIcons = true
        // )
        // this.isNavigationBarVisible = false
        // this.isStatusBarVisible = false
    }
}
thunderbiscuit commented 1 year ago

Before and after:

logs


logs