material-components / material-components/material-components-android
[BottomSheetDialogFragment] Top inset impossible to remove
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 17.4k
- Fork
- 3.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Description:** I am currently trying to create a fullscreen/full height `BottomSheetDialogFragment`, but since it has a very weird behavior implemented where it adds and retracts insets while the sheet is sliding in and out, I decided to disable any inset handling done by the component and manually take care of the insets. However, I found a problem with that approach as well. No matter what I try, the component still forces a top inset that is the same size of the status bar even when disabling any and all inset handling flags I could find checked in the component source code, ex.:
https://github.com/material-components/material-components-android/blob/46778db594edc5915987dcd6e737fa7d15414690/lib/java/com/google/android/material/bottomsheet/BottomSheetBehavior.java#L1726-L1734
The objective is for the component screen to fill the entire screen of the device, but as it currently is the top area of the status bar can never be covered, meaning the component will never display underneath the status bar as desired.
**Expected behavior:** Screenshots are attached,
- Screen 1 is meant to launch the component

- Screen 2 is what is currently happening, notice the top area that cannot be covered

- Screen 3 is what it should be looking like at the top (I created a separat activity just to represent how screen 2 should be looking)

**Source code:** Not applicable.
**Minimal sample app repro:** Sample follows attached.
[BottomSheetInsetBug.zip](https://github.com/material-components/material-components-android/files/11437611/BottomSheetInsetBug.zip)
**Android API version:** Any android version since 24 (7.0 Nougat) till most recent 33 (13.0). Tested all versions and every single one of them have the same issue.
**Material Library version:** Material Android Library version `com.google.android.material:material:1.8.0`
**Device:** Any real device and emulator tested.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da BottomSheetBehavior.java intorno alle righe 1726-1734 e riproduci il problema usando l’esempio allegato BottomSheetInsetBug.zip. Verifica in che modo i flag documentati per la gestione degli inset influiscono sull’inset superiore della barra di stato nelle versioni Android API segnalate. Il lavoro è completo quando un BottomSheetDialogFragment fullscreen può coprire l’area della barra di stato con la gestione degli inset disabilitata, senza compromettere il comportamento di scorrimento esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile-dev
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100