114 Commits

Author SHA1 Message Date
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
Sam
b467b494d9 Changed naming 2019-08-29 15:53:24 -04:00
Sam
faf60b15be Fixed issue 531 by removing unnecessary calls to set compound drawables 2019-08-29 15:53:24 -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
ldjesper
910c940717 Disable MaterialDatePicker ok/confirm button when the selection is not valid
PiperOrigin-RevId: 262573417
2019-08-16 15:49:56 -04:00
dniz
52c1a4d50d Add materialButtonOutlinedStyle and materialButtonToggleGroupStyle to public.xml
Resolves https://github.com/material-components/material-components-android/pull/453

PiperOrigin-RevId: 259959541
2019-07-25 13:14:06 -04:00
dniz
0512f776c5 Remove sub-package AndroidManifest.xml files from lib directory
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -04:00
dniz
68ddfee0ed Remove Material's legacy androidx core_ui and core_utils dependencies in favor of more granular dependencies (coordinatorlayout, graphics, interpolator, customview)
PiperOrigin-RevId: 257452569
2019-07-10 15:17:12 -04:00
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
5df3bebd63 Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
Will follow-up with TabLayout absolute elevation separately

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

PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00