125 Commits

Author SHA1 Message Date
raajkumars
c5c7a74cef [MaterialButton] Updated Material Button style to set the preferred maximum width to 320dp.
PiperOrigin-RevId: 371151853
2021-04-29 14:53:13 -04:00
raajkumars
95da70589c [Catalog][Dialog] Removed full width button style and related dialog themes. Updated catalog dialog demo to showcase how to create dialogs with full width buttons.
PiperOrigin-RevId: 371146951
2021-04-29 14:52:19 -04:00
raajkumars
cd9e6204d8 [Dialog] Added support for full width buttons in dialogs.
PiperOrigin-RevId: 368853063
2021-04-16 18:21:25 -04:00
raajkumars
82333cf59d Internal change
PiperOrigin-RevId: 368487188
2021-04-16 17:46:18 -04:00
raajkumars
7939c171df [MaterialButton] Updated Material Button style to set the preferred maximum width to 320dp.
PiperOrigin-RevId: 368242141
2021-04-13 14:25:05 -04:00
Material Design Team
891d009058 Automated g4 rollback of changelist 367493781
PiperOrigin-RevId: 367522778
2021-04-08 21:29:13 -04:00
raajkumars
d61903470b [MaterialButton] Updated Material Button style to set the preferred maximum width to 320dp.
PiperOrigin-RevId: 367493781
2021-04-08 20:45:57 -04:00
marianomartin
ffb2ad14ff [MaterialButtonToggleGroup] Fixed issues with uncheck and check methods
This unifies the check handling logic so that calling check/uncheck is not treated differently than checking the buttons through touch input

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

PiperOrigin-RevId: 365077462
2021-03-25 14:50:26 -04:00
dniz
25bf03ea2a [Docs] Remove broken @link from MaterialButton Javadoc
PiperOrigin-RevId: 356506184
2021-02-17 06:40:30 -08:00
hunterstich
fe58a4c81e [Button] Updated custom background warning message to be more informative.
Resolves https://github.com/material-components/material-components-android/issues/1803

PiperOrigin-RevId: 337894750
2020-10-19 11:47:05 -07:00
Gabriele Mariotti
391d1f8ac5 [Snackbar] Changed dimens according to spec
Resolves https://github.com/material-components/material-components-android/pull/1711
Resolves https://github.com/material-components/material-components-android/issues/1721

GIT_ORIGIN_REV_ID=c039075b65833724b59ecdfde1ba70ed8ae5b8eb
Co-authored-by: pekingme <pekingme@gmail.com>
PiperOrigin-RevId: 333292492
2020-09-23 12:08:37 -07:00
Aidan Pieper
70d659db60 [MaterialButtonToggleGroup] Fixed margins on MaterialButtonToggleGroup when changing orientations
Resolves https://github.com/material-components/material-components-android/pull/1521

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
GIT_ORIGIN_REV_ID=c87c9ec3258c52fd3e6e2824b8dca2823b9500a5
PiperOrigin-RevId: 323781705
2020-07-29 10:38:35 -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
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Rafael Wolf de Goes
b39845a452 Automated g4 rollback of changelist 314782767
PiperOrigin-RevId: 316867631
2020-06-17 18:40:38 -07:00
connieshi
15c048c0fa [MaterialButtonToggleGroup] Do not update the checked state of any child buttons during onPressedChanged callback.
Resolves https://github.com/material-components/material-components-android/issues/1365

PiperOrigin-RevId: 314798502
2020-06-05 14:51:21 -04:00
Rafael Wolf de Goes
1171418c2b Automated g4 rollback of changelist 314715132
PiperOrigin-RevId: 314782767
2020-06-05 14:49:43 -04:00
Rafael Wolf de Goes
a284edd719 [MaterialButton] Align icon on top
Resolves https://github.com/material-components/material-components-android/pull/1129

GIT_ORIGIN_REV_ID=8d663b1ca7f7bf62e1e5aa8cfc887a33bdbaf9a2
PiperOrigin-RevId: 314715132
2020-06-05 14:46:34 -04:00
Material Design Team
76ffe35fef Cleanup
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
Material Design Team
7cfc63ed35 Fix MaterialButton$SavedState ClassNotFoundException
PiperOrigin-RevId: 313512256
2020-05-29 15:51:33 -04:00
Rafael Wolf de Goes
6455e69ba7 Automated g4 rollback of changelist 312323243
PiperOrigin-RevId: 312420120
2020-05-20 17:03:52 -04:00
Rafael Wolf de Goes
cbc46e9c8d [MaterialButton] Align icon on top
Resolves https://github.com/material-components/material-components-android/pull/1129

GIT_ORIGIN_REV_ID=8d663b1ca7f7bf62e1e5aa8cfc887a33bdbaf9a2
PiperOrigin-RevId: 312323243
2020-05-19 18:35:01 -04:00
connieshi
2d0e00980c Dispatch button checked after the the button states have been updated and any internal corrections (e.g. singleSelection, selectionRequired) has been made.
Do not dispatch button checked if the button state does not actually change.

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

PiperOrigin-RevId: 310936891
2020-05-11 16:06:36 -04:00
Anders Kielsholm
42126efce8 [MaterialButtonToggleGroup] Single visible button corners
Resolves https://github.com/material-components/material-components-android/pull/1260

GIT_ORIGIN_REV_ID=a5c22101761a8727bb1bdcfad8c16596883f3d93
PiperOrigin-RevId: 309259039
2020-05-01 14:45:25 -04:00
Audrius Karosevicius
df84e91819 Automated g4 rollback of changelist 304625391
PiperOrigin-RevId: 305727309
2020-04-13 09:47:05 -07:00
Audrius Karosevicius
b7d46c4ba9 Automated g4 rollback of changelist 304610560
PiperOrigin-RevId: 304625391
2020-04-03 10:11:25 -07:00
Audrius Karosevicius
a6c0c4c53a [MaterialButton] Save state
Resolves https://github.com/material-components/material-components-android/pull/1123

GIT_ORIGIN_REV_ID=56600d14c8bab0932f3b3569c94d548d1c1523f2
PiperOrigin-RevId: 304610560
2020-04-03 10:06:26 -07:00
isabellekim
309d71860f Respect android:background attribute for MaterialButton.
PiperOrigin-RevId: 303732939
2020-03-30 15:52:26 -04:00
isabellekim
b5f4c788c6 Remove android:background from default MaterialButton styles in preparation for changing MaterialButton to read the android:background attribute.
PiperOrigin-RevId: 297875537
2020-02-28 15:10:26 -05:00
afohrman
594e5cd446 Add missing attributes to button res/public.xml.
Adds the following attributes:
-iconGravity
-checkedButton

This commit also:
- deletes iconTintMode, which is not declared in the button package and does not need to be included in the list of attributes in public.xml
- rearranges the ordering of the attributes for clarity

PiperOrigin-RevId: 294018694
2020-02-10 10:00:47 -05: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
e56b141dd5 [MaterialButtonToggleGroup] SelectionRequired attribute doesn`t enforce checkedButtonId to be a valid id (returns -1)
Resolves https://github.com/material-components/material-components-android/issues/956

PiperOrigin-RevId: 292334820
2020-01-31 11:10:08 -05:00
Material Design Team
4389a18128 Add CollectionInfos and CollectionItemInfos to MaterialButtonToggleGroup and MaterialButton for accessibility.
PiperOrigin-RevId: 286922716
2019-12-23 15:43:46 -05:00
Zhaonian Luan
be8fb0f1ff [MaterialButtonToggleGroup] Clean up
Resolves https://github.com/material-components/material-components-android/pull/796

Co-authored-by: wcshi <38438920+wcshi@users.noreply.github.com>

GIT_ORIGIN_REV_ID=77f2471c1fbd9b44a8df1d252a41d582ddcbee0f
PiperOrigin-RevId: 284044596
2019-12-08 14:18:17 -05:00
marianomartin
a4b90321e3 Add selection required option to MaterialButtonToggleGroup
Setting selectionRequired = true. Makes it so that the last option on the Group cannot be unselected. Similar to how a Text Alignment toggle works.

PiperOrigin-RevId: 281366158
2019-11-20 14:36:15 -05:00
marianomartin
9fc1377755 [MaterialButtonToggleGroup] Fix corners after changing view visibility
People might want to set some of the buttons to GONE, this cl makes sure
the shape appearances remain coherent after doing so dynamically.

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

PiperOrigin-RevId: 276508915
2019-11-01 13:28:40 -07:00
marianomartin
115313c0c0 Expose a class for themeoverlay in style
This moves functionality from ThemeEnforcement into a stand alone class.

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

PiperOrigin-RevId: 275481343
2019-10-21 10:24:19 -04:00
marianomartin
24ab59af6c Support orientation VERTICAL in MaterialButtonToggleGroup
Resolves https://github.com/material-components/material-components-android/issues/476

PiperOrigin-RevId: 273514626
2019-10-08 10:35:08 -04:00
marianomartin
a405dd9664 Change MaterialButtonToggleGroup to extend LinearLayout
PiperOrigin-RevId: 272989081
2019-10-04 20:39:01 -04:00
ldjesper
294f12498d Rename setCornerRadius to setAllCornerSizes
PiperOrigin-RevId: 272959729
2019-10-04 20:08:43 -04:00
cketcham
0547d2a06b Uncouple CornerSize from CornerTreatment
This allows for more easily updating the CornerSize independently from the CornerTreatment and makes it possible to create different types of CornerSizes such as percentage based corners. However, this means corner sizes can be different depending on the bounds of the shape, so the bounds need to be provided. MaterialShapeDrawable has bounds and the ShapeAppearanceModel, so there are new convenience methods there which return the current corner size for the current bounds of the drawable.

PiperOrigin-RevId: 272908508
2019-10-04 15:23:16 -04:00
Sam
a610215b77 [MaterialButton] Fixed issue 531 by removing unnecessary calls to set compound drawables
Resolves https://github.com/material-components/material-components-android/pull/589

GIT_ORIGIN_REV_ID=3f167e1a3f5a369fc3bfda152f28b80c3cb25181
PiperOrigin-RevId: 270331104
2019-09-24 12:17:58 -04:00
marianomartin
d3d8c0a9fb Remove corner adjustment flag and code
PiperOrigin-RevId: 269652871
2019-09-18 14:20:44 -04:00
marianomartin
167663ae45 Internal cleanup
PiperOrigin-RevId: 268698913
2019-09-12 14:29:01 -04:00
marianomartin
bec86a0c34 Cleanup
PiperOrigin-RevId: 268343765
2019-09-12 14:02:14 -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
Connie
9ed90216a3 Revert "Fixed issue 531 by removing unnecessary calls to set compound drawables"
This reverts commit faf60b15bea73588e8c76fc348ace50dd430cf55.
2019-08-29 15:55:46 -04:00
Connie
b814e8ef74 Revert "Changed naming"
This reverts commit b467b494d9f87581c20009706bce4dc9a7cb8c44.
2019-08-29 15:55:46 -04:00