14 Commits

Author SHA1 Message Date
marianomartin
8e923bdb65 [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
(cherry picked from commit 9fc13777550b4378a48aea22f46b7656805a20c8)
2019-11-07 10:20:07 -05:00
marianomartin
beb547b63e Support orientation VERTICAL in MaterialButtonToggleGroup
Resolves https://github.com/material-components/material-components-android/issues/476

PiperOrigin-RevId: 273514626
(cherry picked from commit 24ab59af6c85b313519a14c04ad65f0ee15fb53f)
2019-11-07 10:19:56 -05:00
marianomartin
410bc07d64 Change MaterialButtonToggleGroup to extend LinearLayout
PiperOrigin-RevId: 272989081
(cherry picked from commit a405dd9664731e128323595e2934827f838d2e9f)
2019-10-04 22:25:34 -04:00
cketcham
a0547c6362 Rename setCornerRadius to setAllCornerSizes
PiperOrigin-RevId: 272959729
(cherry picked from commit 294f12498dd5f244754875e3c0b5b11bbf859ea4)
2019-10-04 22:25:08 -04:00
cketcham
53e181b82d 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
(cherry picked from commit 0547d2a06bfa636990c99c74a7a16e02cef41647)
2019-10-04 15:38:10 -04:00
cketcham
7bb525ff59 Update usages of ShapeAppearanceModel to use Builder pattern
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -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
Jaeyoung
841d660439 Update MaterialButtonToggleGroup.java
fix wrong closing tag

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

GIT_ORIGIN_REV_ID=2d55ec5261ba986863ac7b3a6cdd277a11d64784
PiperOrigin-RevId: 255404599
2019-07-03 13:52:59 -04:00
gauthams
cda68edcaf Add uncheck(int id) API for unchecking single button to MaterialButtonToggleGroup
PiperOrigin-RevId: 252723596
2019-06-18 13:16:05 -04:00
gauthams
e869edd032 Document return value of getCheckedButtonIds() in MaterialButtonToggleGroup
PiperOrigin-RevId: 252702693
2019-06-18 12:05:19 -04:00
gauthams
64ad735c12 Add MaterialButtonToggleGroup docs
PiperOrigin-RevId: 243345601
2019-04-19 16:22:36 -04:00
gauthams
64d7de8020 Add checkedId tracking for singleSelection mode of MaterialButtonToggleGroup
PiperOrigin-RevId: 242558776
2019-04-19 13:00:04 -04:00
gauthams
cad9d7d5f5 Add MaterialButtonToggleGroup
PiperOrigin-RevId: 236745008
2019-03-08 09:56:58 -05:00