17 Commits

Author SHA1 Message Date
cketcham
6e340c49d4 Fix BottomAppBarTopEdgeTreatment bug caused by large negative vertical offset
While some small negative values for vertical offset do work, this use case is currently not supported. Most negative values result in the cutout being drawn incorrectly. This also adds a new exception to help clarify the crash in the future.

Resolves https://github.com/material-components/material-components-android/issues/906

PiperOrigin-RevId: 292148159
2020-01-29 16:15:04 -05:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
cketcham
06b15017f6 Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264851045
2019-08-26 11:39:59 -04:00
dniz
cc73c2a630 Update TODOs
PiperOrigin-RevId: 259535844
2019-07-23 11:21:39 -04:00
marianomartin
ad8003d8e9 Internal cleanup
PiperOrigin-RevId: 255441067
2019-07-03 13:56:54 -04:00
dniz
1f244318d8 Add @hide to all @RestrictTo annotations that are missing it
PiperOrigin-RevId: 243646339
2019-04-19 16:29:30 -04:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
afohrman
98d4b148d1 Create deep copies of CornerTreatments and EdgeTreatments in ShapeAppearanceModel's copy constructor.
Implement Cloneable and override Object#clone() to create deep copies of the corner and edge treatments. The Cloneable method is generally discouraged, but this solution appears to be the most effective solution for our use case because:

- CornerTreatment and EdgeTreatment don't contain mutable fields, so using the native Object#clone() should be fine. This allows us to avoid intervening in the clone() method, which is one of the main reasons to avoid using Obect#clone().
- Since we have to maintain binary compatibility with our 1.0.0 stable release, we have very little wiggle room with which to ensure that we have effective copy() methods in each subclass of CornerTreatment and EdgeTreatment.

PiperOrigin-RevId: 222311453
2018-12-06 11:17:48 -05:00
marianomartin
415e6ea003 Add a cut corners top edge treatment in the BAB demo
PiperOrigin-RevId: 222071849
2018-11-26 07:55:59 -05:00
cketcham
560c982284 Enable shadows for BottomAppBar
PiperOrigin-RevId: 218868156
2018-10-28 21:44:27 -04:00
cketcham
c6a08a4b68 Allow for centering on EdgeTreatments
PiperOrigin-RevId: 214613004
2018-09-28 16:28:45 -04:00
cketcham
8e3cbc3463 Fix BottomAppBar background when no Fab is anchored
PiperOrigin-RevId: 199656555
2018-06-20 17:25:55 -04:00
cketcham
bc9224e122 Add missing accessor methods for BottomAppBar
PiperOrigin-RevId: 198593477
2018-05-30 17:44:24 -04:00
cketcham
eb56a61a3b Fix BottomAppBar top edge to prevent pointy corners
PiperOrigin-RevId: 198550727
2018-05-30 17:42:24 -04:00
cketcham
c172562488 Update BottomAppBar fab margin to represent the distance between the cutout and the fab rather than twice the distance
PiperOrigin-RevId: 197939692
2018-05-30 17:32:51 -04:00
marianomartin
1e4a3d17fb Dynamically getting size of the fab button. Using that plus a margin defined in style to get the proper size for the cutout
PiperOrigin-RevId: 194232804
2018-04-30 12:01:20 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00