material-components / material-components/material-components-android
[MaterialDividerItemDecoration] Request: support GridLayoutManager too
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
Is your feature request related to a problem? Please describe.
Currently it supports only one orientation, but not both. This is what's in code:
MaterialDividerItemDecoration divider =
new MaterialDividerItemDecoration(getContext(), orientation);
recyclerView.addItemDecoration(divider);
Not only that, but I think it draws outside the boundary. If you can, you can compare what you make with this solution:
https://github.com/Fondesa/RecyclerViewDivider
Describe the solution you'd like
Be able to set the divider to be shown on all orientations of the layoutManager, so that it will work for a grid, too.
Maybe even make it as such by default, because on the other solution I've mentioned it doesn't require it at all.
Describe alternatives you've considered
As I wrote, this works better:
https://github.com/Fondesa/RecyclerViewDivider
The usage there is as such:
recyclerView.addDivider()
Additional context
Relevant part in the sample:
https://github.com/material-components/material-components-android/tree/master/catalog/java/io/material/catalog/divider
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 l’utilizzo di MaterialDividerItemDecoration nell’esempio del catalogo e confronta il suo comportamento attuale con la soluzione RecyclerViewDivider collegata. Verifica che la modifica supporti entrambe le orientazioni con GridLayoutManager e mantenga i divisori entro i limiti del layout.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100