material-components / material-components/material-components-android
[BottomSheet] PeekHeight measured incorrectly during first layout when marginTopSystemWindowInsets is set to true
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:
When application is in edge-to-edge mode, it is expected that peekHeight will be increased by the bottom system window inset when paddingBottomSystemWindowInsets=true. However, if you set marginTopSystemWindowInsets to true at the same time, then at first peekHeight is going to be measured incorrectly - it'll be decreased by the size of the top inset. Once you expand the sheet and collapse it again, it'll be collapsed to the correctly measured peek height.
Expected behavior:
Peek height should be not effected by the top system window inset, when marginTopSystemWindowInsets=true during every layout.
I suspect that https://github.com/material-components/material-components-android/pull/2094 might fix the issue.
Source code:
Here's the project which demonstrates the issue https://github.com/Lingviston/bottom-sheet-peek-height-bu/tree/master
The short recording can be found there in /demo folder.
Android API version: Any
Material Library version: 1.9.0
Device: Pixel 4 API 28, Pixel 2 API 31
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 con il progetto di riproduzione collegato bottom-sheet-peek-height-bu e la registrazione nella relativa cartella /demo. Riproduci il comportamento del primo layout con entrambe le opzioni system-inset abilitate, quindi esamina l’implementazione di BottomSheet e i test pertinenti per individuare il punto in cui l’inset superiore influisce su peekHeight. Il lavoro è completato quando il layout collapsed iniziale e quelli successivi usano la stessa peekHeight correttamente adattata agli inset.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100