Skip to content

[Slider] Tick size changeable #1920

@neclomant

Description

@neclomant

Is your feature request related to a problem? Please describe.
I want to do slider with ticks that have size bigger than default.

Describe the solution you'd like
I suggest it may be a property like tickRadius or tickSize. Also there is need to enable isAntiAlias flag to tick paint if tick size will be large

Describe alternatives you've considered
Now I do this dirty through the reflection

val cls = Class.forName("com.google.android.material.slider.BaseSlider")
cls.getDeclaredField("activeTicksPaint").apply {
            isAccessible = true
            (get(mySlider) as Paint).apply {
                isAntiAlias = false
                strokeWidth = desiredSize
            }
            isAccessible = false
        }

Additional context
Design I want to implement
image

We also happily accept pull requests.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions