BottomSheet appears to go behind the statusBar
See original GitHub issueHello
I have the following code that I inflate for my bottom sheet:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Upload a picture"
android:layout_margin="16dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Option 1"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Option 2"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
/>
</LinearLayout>
It inflates fine - but the problem is that if you drag the bottomsheet to the top of the screen, some of it hides behind the statusBar.
Before I drag it to the top (peekSheet):
After dragging it to the top - you can see that the “Upload a picture” text is hidden somewhat :
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Is there any way to draw BottomSheetDialogFragment behind ...
I'm looking for a solution to draw my BottomSheetDialogFragment behind the status bar. I tried to override styles:
Read more >Show BottomSheetDialogFragment changes status bar color ...
When you show just a simple Dialog the status bar color does not change, the background just gets a little bit dark. I...
Read more >Bottom Sheet like in a Google Task app | by Alex Fialko
You can see that the BottomSheet is moving under the status bar while it's content is moving down simultaneously.
Read more >BottomSheetDialog - Android Developers
In edge to edge mode, padding will be added automatically to the top when sliding under the status bar. Padding can be applied...
Read more >react-native-bottom-sheet-behavior - npm
This component is rendered behind the BottomSheetBehavior, and behave like a parallax when BottomSheet is dragging. you should pass a fixed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry - I figured it out guys.
I had the following code in my layout file:
<com.flipboard.bottomsheet.BottomSheetLayout android:id=“@+id/bottomsheet” android:layout_width=“match_parent” android:layout_height=“match_parent” xmlns:android=“http://schemas.android.com/apk/res/android” xmlns:tools=“http://schemas.android.com/tools” xmlns:app=“http://schemas.android.com/apk/res-auto”>
Because I have said android:fitsSystemWindows=“true”, it actually stretches the bottomsheet to behind the statusbar. Removing that line corrects the display.
@Naveen9453 you are looking for the design support library’s bottomsheet, not this one.