material-components / material-components/material-components-android

[BottomSheet] sample can't be built, docs and sample don't match, and missing information of edge-to-edge

Offen
#4,253 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug Issue: Catalog
Vorherrschende Sprache
Java
Sterne
17.4k
Forks
3.2k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Description: Full description of issue here
Right now, if you check the sample "catalog" and reach the bottom sheet code, you will see it's quite old, not matching the docs, and even reaches protected API of the library:

https://github.com/material-components/material-components-android/blob/629e24f147755150a6769768832a150686a9d2ff/catalog/java/io/material/catalog/bottomsheet/BottomSheetScrollableContentDemoFragment.java#L57

The docs say to use "enableEdgeToEdge " and setting "navigationBarColor" to be transparent, but the sample doesn't have any of these:

https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md#setting-behavior:~:text=On%20API%2021%20and%20above%20the%20modal%20bottom%20sheet%20will%20be%20rendered%20fullscreen%20(edge%20to%20edge)%20if%20the%20navigation%20bar%20is%20transparent%20and%20app%3AenableEdgeToEdge%20is%20true.%20To%20enable%20edge%2Dto%2Dedge%20by%20default%20for%20modal%20bottom%20sheets%2C%20you%20can%20override%20%3Fattr/bottomSheetDialogTheme%20like%20the%20below%20example%3A

Not to mention the sample doesn't even build fine, so I can't run it to see how well it works other than using the release-apk of the repository.

studio64_2024-08-05_21-53-35.zip

Expected behavior: Screenshots and/or description of expected behavior

  1. The sample should match the latest APIs that are documented and recommended.
  2. The sample should be built fine using latest Android Studio version.
  3. The docs should mention what it means app:enableEdgeToEdge is true, because it doesn't show it in the snippets and doesn't mention it anywhere there, of where to put it.

Source code: The code snippet which is causing this issue
All here (sadly can't attach, as it's beyond max attachment file limits) :
https://github.com/material-components/material-components-android

Minimal sample app repro: Please consider attaching a minimal sample app that reproduces the issue. This will help narrow down the conditions required for reproducing the issue, and it will speed up the bug fix process. You may attach a zip file of the sample app or link to a GitHub repo that contains the sample app.
All here (sadly can't attach, as it's beyond max attachment file limits) :
https://github.com/material-components/material-components-android

Android API version: Android API version here
It's before reaching this phase.

Material Library version: Material Android Library version you are using here (e.g., 1.1.0-alpha07)
1.13.0-alpha04

Device: Device on which the bug was encountered here
PC.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit catalog/java/io/material/catalog/bottomsheet/BottomSheetScrollableContentDemoFragment.java und vergleiche es mit docs/components/BottomSheet.md. Führe den catalog/sample-Build aus, um den aktuellen Fehler zu identifizieren, und prüfe, wie die dokumentierte edge-to-edge-Konfiguration angewendet wird. Als erledigt gilt die Aufgabe, wenn das Beispiel gebaut werden kann, die dokumentierten APIs verwendet und in der Dokumentation erklärt wird, wo app:enableEdgeToEdge hingehört.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, java
Bereich
build-system, documentation, mobile
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.