marianomartin
8f0aa7f8d6
Split Slider into two classes
...
Slider throws an exception when calling getValue with more than one value. Supporting both single value and multiple values in the same class makes it confusing. While not supporting convenience methods getValue and setValue in the multi value class makes it, well, inconvenient.
In addition min, max are also a bit ambiguous since seekBar uses these for valueFrom and valueTo so those were removed.
PiperOrigin-RevId: 311774410
2020-05-18 11:19:05 -04:00
cketcham
340cdea60d
Add a11y support to Slider
...
This includes support for Range slider when there is more than one thumb. Each thumb can receive focus and behaves as if it was it's own SeekBar.
Resolves https://github.com/material-components/material-components-android/issues/827
PiperOrigin-RevId: 294681995
2020-02-13 10:23:18 -05:00
haodong
bb34f717df
Refactor trackColor attribute into common resources.
...
PiperOrigin-RevId: 291983432
2020-01-29 15:32:01 -05:00
cketcham
9ae1494597
Add option to hide the Slider's label
...
This creates 3 options, to have the label floating, within the bounds of the view, or not shown.
Resolves https://github.com/material-components/material-components-android/issues/703
PiperOrigin-RevId: 287244827
2019-12-30 13:31:52 -05:00
cketcham
dc17035a8b
Fix height of Slider when floating label is false
...
PiperOrigin-RevId: 286201599
2019-12-18 15:55:40 -05:00
cketcham
f28cc095a7
Reorganized and updated comments in Slider
...
PiperOrigin-RevId: 286194091
2019-12-18 15:54:30 -05:00
cketcham
921d392602
Rename slider tick and track color attributes to keep them together when sorted alphabetically
...
PiperOrigin-RevId: 285972204
2019-12-17 17:06:10 -05:00
cketcham
fe160f33e6
Add option to set the track height of the Slider
...
PiperOrigin-RevId: 284667379
2019-12-10 07:25:07 -05:00
cketcham
df94cd1bca
Remove the requirement to setClipChildren false on the parent of Slider
...
Draw the Slider label with ViewOverlay, and update the way the halo is drawn pre lollipop. This stops any clipping that happens by the bounds view.
Resolves https://github.com/material-components/material-components-android/issues/697
PiperOrigin-RevId: 284650572
2019-12-10 07:24:00 -05:00
cketcham
5d1a369ea0
Update Slider to use TooltipDrawable
...
PiperOrigin-RevId: 282583539
2019-12-02 17:27:40 -05:00
cketcham
4e1da2a4be
Update Slider to use RippleDrawable for Lollipop and above
...
PiperOrigin-RevId: 276528198
2019-11-01 13:28:40 -07:00
cketcham
349f91c07b
Always draw the Slider's label
...
Also adds an option to toggle floating the label above the views around the slider, or adding extra height to the slider to keep the label inside the bounds.
PiperOrigin-RevId: 272713986
2019-10-03 15:43:03 -04:00
cketcham
f8fe052ed3
Add support for Slider thumb elevation
...
PiperOrigin-RevId: 269866946
2019-09-20 10:56:07 -04:00
cketcham
38e95a5f3c
Remove the gap between the thumb and track in disabled mode
...
PiperOrigin-RevId: 268905977
2019-09-18 14:04:28 -04:00
cketcham
97ca231d70
Allow the radius of the thumb and halo around the thumb to be set by the style
...
PiperOrigin-RevId: 268735380
2019-09-18 13:01:22 -04:00
marianomartin
53d4185ff9
Internal cleanup
...
PiperOrigin-RevId: 267368841
2019-09-12 13:47:15 -04:00