-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove protectNavBars
property
#38
Conversation
This is not an API I want to support as nav bars have nothing to do with bottom sheets. Plus it is something specific for Android and I don't want to polute the API with platform specific properties. Can you do me a favor and change your PR to remove the protection code from the The protect param was there before PS: I am under the assumption that removing them with cause the nav bar to stay as it was before showing the modal, but you would need to test it out. |
Btw, unrelated to this PR but I noticed that the sheet in your video is not smooth. (does not appear instantly and skips frames) Not sure if this is the recording or not, but if it is your app, make sure you are not blocking the UI thread. Might even fix your issue |
e6b51de
to
39c3155
Compare
LaunchedEffect(modalSheetState.targetDetent) { | ||
onTargetSheetDetentChange(modalSheetState.targetDetent) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Demo is intended for the documentation website. can you reset the change on the demo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure
private fun recolorNavigationBar(isAppearanceLight: Boolean) { | ||
val windowInsetsController = WindowInsetsControllerCompat(window, window.decorView) | ||
windowInsetsController.isAppearanceLightNavigationBars = isAppearanceLight | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Demo is intended for the documentation website. can you reset the change on the demo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
39c3155
to
ac3fc96
Compare
It's okay, just lagging emulator |
protectNavBars
propertyprotectNavBars
property
Looks great. Thanks a lot for the contribution. Merged |
Hi there!
I need to make my system bars fully transparent. But
ModalBottomSheet
forces toprotectNavBars = true
.I found the issue #12 and tried this approach, but if you make this:
then half-transparent system bars background blinks for a moment anyway.
You can see it on a video:
Screen_recording_20241028_202132.mp4
So it would be great to allow to customize
protectNavBars
value to avoid it.Pros:
LaunchedEffect
especially forModalBottomSheet
, you can setup it once for the whole application.ModalBottomSheet
.