material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.37k stars 3.07k forks source link

[Slider] Add vertical orientation support #794

Open Pittvandewitt opened 4 years ago

Pittvandewitt commented 4 years ago

Is your feature request related to a problem? Please describe. There's no option to rotate this component natively. SeekBar didn't have this option either, but at least it did not look strange when it was rotated because it had no floatingLabel.

Describe the solution you'd like I'd love to see an option where you can set an attribute like android:orientation="vertical" on this component which will make the floatingLabel appear above the thumb

Describe alternatives you've considered An alternative to this problem is to wrap it in a layout and rotate it, but this will rotate the floatingLabel as well (see image)

Additional context I'm working on an graphic equalizer application where I try to implement Slider to set the gain on the bands. image

vaibzzz123 commented 4 years ago

Any updates on this? Does anyone know a good alternative until this is implemented?

agent10 commented 4 years ago

Any plans to implement it?

smelfungus commented 4 years ago

Vertical Slider support should be a nice feature to implement since there are no standard SDK vertical SeekBar support (with none coming) and only imperfect existing rotation/measurements/custom views workarounds.

ashar-7 commented 4 years ago

I really need this

VyacheslavDev commented 4 years ago

It's very need!

sebastianharder commented 3 years ago

Adding android:rotation="270" to the slider is a good start, however the tooltip sizing does not work correctly with this - the longer the text of the label, the higher the tooltip background is getting.

Would be a nice MVP for vertical sliders.

midare16 commented 3 years ago

and right to left feature please

terrymendelse commented 2 years ago

The slider rotated 270 degrees into a vertical slider is not adjustable in talkback mode. Might/should make sure this is handled if and when the vertical option is provided