22 Commits

Author SHA1 Message Date
pubiqq
23aca03255 [Internal] Remove pre-Lollipop checks
Resolves https://github.com/material-components/material-components-android/pull/4266

GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
Ga\u00ebtan Muller
b3fe6a7f61 [Cleanup] Remove redundant version checks for api <= 19.
Resolves https://github.com/material-components/material-components-android/pull/3849

GIT_ORIGIN_REV_ID=47bb2fcc8031740e5a7d4f741f1ada2af025e126
PiperOrigin-RevId: 632154861
2024-05-09 18:46:02 +00:00
pubiqq
74b7706de9 [ShapeableImageView] Don't change layer type when view is detached from the window
When the exit transition starts, the layer type is set to LAYER_TYPE_NONE (inside onDetachedFromWindow). In this case, clearPaint (Paint with Xfermode = PorterDuff.Mode.DST_OUT) stops working correctly.
The patch just deletes the layer type setup from onDetachedFromWindow, leaving the layer type set to LAYER_TYPE_HARDWARE.

Resolves https://github.com/material-components/material-components-android/issues/2703
Resolves https://github.com/material-components/material-components-android/pull/2792

GIT_ORIGIN_REV_ID=b05230b40529251b8b16cc02f1cfd64f3801c1d8
PiperOrigin-RevId: 459308833
2022-07-06 13:15:46 -07:00
Drew Hamilton
c4f7de167f [ShapeableImageView] Support contentPadding
Resolves https://github.com/material-components/material-components-android/pull/1871

GIT_ORIGIN_REV_ID=42b91686512ed77d38f5a70a26cc52157ff4184b
Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 342906676
2020-11-17 15:52:38 -05:00
Drew Hamilton
af73a1771e [ShapeableImageView] Call invalidateOutline when shape is changed
Resolves https://github.com/material-components/material-components-android/pull/1769

PiperOrigin-RevId: 342118551
2020-11-14 10:12:36 -05:00
marianomartin
bcf54ab323 [ShapeableImageView] delay initialization of shadows drawable
PiperOrigin-RevId: 327643252
2020-08-20 16:45:54 -04:00
marianomartin
c59c04639c [MaterialShapeDrawable] Convert ShapeAppearancePathProvider to a singleton.
Also allocate less path objects.

PiperOrigin-RevId: 325287653
2020-08-06 21:10:36 -04:00
marianomartin
fbefa5a0ec [ShapeableImageView] Fixed shadows for non round rects
https://github.com/material-components/material-components-android/issues/1562

PiperOrigin-RevId: 325069672
2020-08-05 16:26:06 -04:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
marianomartin
ef3f09d4e0 [ShapeableImageView] made stroke field nullable
PiperOrigin-RevId: 314599771
2020-06-04 16:05:33 -04:00
Ethan Hsu
2b676b46a9 [ShapeableImageView] Allow ShapeableImageView to dynamically update shape appearance
In some cases setShapeAppearanceModel will be called after onSizeChanged but before the first draw. This results in the mask being out of date.

Resolves https://github.com/material-components/material-components-android/pull/1328

GIT_ORIGIN_REV_ID=3d99c7857595ff0ba61c1aaa65963909c1950c10

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 313402813
2020-05-27 14:03:14 -04:00
marianomartin
24f9c06396 [ShapeableImageView] Change strokeWidth to float and support null for stroke color
Resolves https://github.com/material-components/material-components-android/issues/1330
Resolves https://github.com/material-components/material-components-android/issues/1331

PiperOrigin-RevId: 313390374
2020-05-27 13:57:38 -04:00
marianomartin
de111bb53b Change ShapeableImageView shape logic to onSizeChanged
PiperOrigin-RevId: 307696728
2020-04-22 15:11:05 -04:00
marianomartin
7e99fcb67d Fix issue when setting padding and ShapeableImageView background
PiperOrigin-RevId: 299359752
2020-03-06 11:39:32 -08:00
isabellekim
1f9de68025 [All] Add support for materialThemeOverlay
Resolves https://github.com/material-components/material-components-android/pull/948

GIT_ORIGIN_REV_ID=5a8bb35a56c1b813df47d964de8482a26e0da66d
PiperOrigin-RevId: 293839172
2020-02-10 09:55:19 -05:00
marianomartin
30ec731a28 Remove experimental annotation from ShapeableImageView
PiperOrigin-RevId: 293251962
2020-02-05 17:28:32 -05:00
marianomartin
20d2efed82 Change ShapeableImageView to use a Hardware layer
PiperOrigin-RevId: 291699732
2020-01-27 10:43:11 -05:00
marianomartin
39d49158c8 [ShapeableImageView] Re draw on invalidate if the drawable is animatable.
Resolves https://github.com/material-components/material-components-android/issues/890

PiperOrigin-RevId: 291142205
2020-01-23 08:28:19 -05:00
marianomartin
36426fc74c [ShapeableImageView] Support more types of Drawables
Resolves https://github.com/material-components/material-components-android/issues/890
Resolves https://github.com/material-components/material-components-android/issues/842

PiperOrigin-RevId: 289167223
2020-01-10 16:47:00 -08:00
marianomartin
1aef5b9a9e [ImageView] Add catalog ImageView demo
PiperOrigin-RevId: 285279245
2019-12-13 17:30:43 -05:00
connieshi
186884701d Call themeApplicationContext inside createToggleGroupWithButtons because the order of @Before method calls is not deterministic.
PiperOrigin-RevId: 284244654
2019-12-10 07:18:55 -05:00
marianomartin
15ed06eb86 Move ImageView component to third party
PiperOrigin-RevId: 284189970
2019-12-08 15:20:54 -05:00