Status Update
Comments
cl...@google.com <cl...@google.com>
mv...@google.com <mv...@google.com> #2
+1, and also we should make other APIs follow this naming convention as well:
`SwitchConstants.defaultColors` -> `SwitchDefaults.colors()`
`TabConstants` -> `TabDefaults`
`RadioButtonConstants.defaultColors` -> `RadioButtonDefaults.colors()`
`SnackbarConstants` -> `SnackbarDefaults`
`CheckboxConstants` -> `CheckboxDefaults`
etc...
`SwitchConstants.defaultColors` -> `SwitchDefaults.colors()`
`TabConstants` -> `TabDefaults`
`RadioButtonConstants.defaultColors` -> `RadioButtonDefaults.colors()`
`SnackbarConstants` -> `SnackbarDefaults`
`CheckboxConstants` -> `CheckboxDefaults`
etc...
ma...@google.com <ma...@google.com> #3
Thanks folks, me and Louis have been thinking about this change for a while.
I tend to agree. For context, historically we were expecting to have not only defaults there, but other constants from which the developer can choose from as well. It seems like for now there were no precedents of that :)
After that discussion we waited for one more month, and nothing came up, so I feel like it's the time to make this change.
ch...@google.com <ch...@google.com> #4
I agree on the overall direction, just not sure on the class name. How about just Button.defaultColors()
?
ma...@google.com <ma...@google.com> #5
I would prefer to have ButtonDefaults.colors()
and ButtonDefaults.elevation()
.
One downside I can think of is the import static of ButtonDefault
itself, but static imports are evil anyway...
Description
The new
ButtonConstants
class name doesn't feel right. The contents of the class aren't really constants, they're default parameter factories.How about
ButtonDefaults.buttonColors()
instead?