43 Commits

Author SHA1 Message Date
pubiqq
bc2fdeadaf [Internal] Prefer platform methods to compat ones
Resolves https://github.com/material-components/material-components-android/pull/4532

GIT_ORIGIN_REV_ID=180dec736f2521579e483317a4d537629d8f247b
PiperOrigin-RevId: 715494344
2025-01-15 18:06:07 +00:00
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
pekingme
ef1e1cdbfc [Button] Added corner morph.
PiperOrigin-RevId: 657325202
2024-07-30 09:14:03 -07:00
Material Design Team
e4f00fda11 Automated g4 rollback of changelist 637051547
PiperOrigin-RevId: 637099379
2024-05-28 16:59:17 +00:00
pekingme
384d58fb98 [Button] Added responsive touch (corner morph).
PiperOrigin-RevId: 637051547
2024-05-25 02:19:11 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
rightnao
a601107868 [MaterialButton] Add methods to not toggle checked state on buttons on click
Resolves https://github.com/material-components/material-components-android/issues/2291

PiperOrigin-RevId: 453569861
2022-06-07 18:53:01 -07:00
conradchen
363e2b1708 [Button] Always update drawable state when background changed
In certain situations drawable states won't be correctly propagated to the background drawable wrapped in a LayerDrawable during setting view background. Always explicitly updates the drawable state to fix the issue.

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

PiperOrigin-RevId: 446786432
2022-05-06 12:13:07 -04:00
conradchen
45b99f603e [Button] Fix the issue that button state is not updated
On Lollipop, when first assigned as View's background, RippleDrawable won't/can't propagate states to its content drawable. This causes the issue that the state relevant features like stroke colors are not correctly updated when the background is recreated. Explicitly assigns states to the content drawable to fix the issue.

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

PiperOrigin-RevId: 442676637
2022-04-19 10:57:43 -04:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
Victor Cervantes
153fdee2f6 [MaterialButton] Material button lollipop shape fix
Resolves https://github.com/material-components/material-components-android/pull/2331
Resolves https://github.com/material-components/material-components-android/issues/1797

GIT_ORIGIN_REV_ID=cd176426395bf93f701c623c00947384aabf0706
PiperOrigin-RevId: 393405994
2021-08-27 17:29:19 -04:00
marianomartin
f837cb76ab [MaterialButton] Support setting vertical insets programatically
Resolves https://github.com/material-components/material-components-android/issues/526

PiperOrigin-RevId: 323450357
2020-07-28 10:28:38 -04:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
isabellekim
309d71860f Respect android:background attribute for MaterialButton.
PiperOrigin-RevId: 303732939
2020-03-30 15:52:26 -04:00
ldjesper
294f12498d Rename setCornerRadius to setAllCornerSizes
PiperOrigin-RevId: 272959729
2019-10-04 20:08:43 -04:00
marianomartin
d3d8c0a9fb Remove corner adjustment flag and code
PiperOrigin-RevId: 269652871
2019-09-18 14:20:44 -04:00
marianomartin
ca2db830d2 Remove corner adjustment from MaterialButton and ExtendedFloatingActionButton.
ExtendedFloatingActionButton extends from MaterialButton so removing MaterialButton's corner size adjustment removes the adjustment from ExtendedFloatingActionButton, as well.

PiperOrigin-RevId: 268282804
2019-09-12 13:59:27 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
cketcham
7bb525ff59 Update usages of ShapeAppearanceModel to use Builder pattern
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -04:00
marianomartin
0d4515cb46 Internal cleanup
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
cketcham
1068e1029d Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264899198
2019-08-26 14:40:54 -04:00
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
isabellekim
36b760d220 Change ripples on MaterialButton to use the alphas provided in the ColorStateList.
RippleDrawable on different API levels will modulate the alphas differently
for the pressed / focused / hovered states. Therefore, in order to get the
desired alphas for pressed / focused / hovered states, we are using the
mtrl_(low|high)_ripple_(pressed|focused|hovered|default)_alpha values which have
been defined to account for the different implementations of RippleDrawable.

This will allow developers to specify different colors for focused vs. pressed if desired.

PiperOrigin-RevId: 255306749
2019-07-03 13:50:29 -04:00
marianomartin
455ba2557b Internal cleanup
PiperOrigin-RevId: 249490219
2019-05-24 14:22:06 -04:00
marianomartin
90837ec485 Internal cleanup
PiperOrigin-RevId: 249243403
2019-05-21 12:15:07 -04:00
gauthams
d5bbc9cf43 Implement Shapeable interface in MaterialButton
PiperOrigin-RevId: 242559479
2019-04-19 13:00:59 -04:00
gauthams
5848f1fa2d Add elevation overlay support for MaterialButton
PiperOrigin-RevId: 238535050
2019-03-22 16:11:04 -04:00
gauthams
e1c8b13064 Add package-private methods to set shape appearance on MaterialButton
PiperOrigin-RevId: 236355481
2019-03-08 09:50:08 -05:00
gauthams
441877f7cc Add checked state to MaterialButton
PiperOrigin-RevId: 234214200
2019-02-24 14:19:05 -05:00
gauthams
3ad575dad1 Enable drawing surface-color stroke under regular stroke in MaterialButton
PiperOrigin-RevId: 233860616
2019-02-24 14:14:07 -05:00
gauthams
b7ff433981 Remove corner radius adjustment for MaterialButton
PiperOrigin-RevId: 233840694
2019-02-24 14:11:27 -05:00
gauthams
75db2150a8 Add shadow to MaterialButton below API 21
PiperOrigin-RevId: 232737347
2019-02-11 11:17:08 -08:00
gauthams
354349d833 Expose background shape drawable in MaterialButtonHelper
PiperOrigin-RevId: 231321351
2019-02-01 12:38:48 -05:00
marianomartin
eeba1619e9 Resubmit fix for MaterialButton padding bug
PiperOrigin-RevId: 228723499
2019-01-10 17:18:36 -05:00
marianomartin
1220e66ce1 Automated g4 rollback of changelist 228351080
PiperOrigin-RevId: 228386136
2019-01-10 16:50:12 -05:00
marianomartin
218225008a Update stroke instead of creating background again
PiperOrigin-RevId: 228351080
2019-01-10 16:49:24 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
gauthams
a48a9af060 Shape system changes for MaterialButton
PiperOrigin-RevId: 225050954
2018-12-12 16:22:46 -05:00
afohrman
7656db9b1e Update TabLayout and MaterialButtonHelper documentation for LayerDrawable workaround.
PiperOrigin-RevId: 219127481
2018-11-01 16:03:25 -07:00
gauthams
ba44d62af4 Update MaterialButton setRippleColor to properly convert it's ColorStateList before setting rippleColor
PiperOrigin-RevId: 212636260
2018-09-14 10:57:50 -04:00
gauthams
58df7b8baa Fixing MaterialButton padding API surface
PiperOrigin-RevId: 202584064
2018-07-02 09:49:33 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00