I'm trying to make some Seekbar for my app as a distance value. I had liked it to looks something like this (image was taken from - link):
Can someone please show a simple example of how to make something like this?
I know that I can use "already made" Seekbars from Github but I'm trying to understand the concept so I can further design it.
Thank you
With the Material Components Library version 1.2.0 provided by Google you can use the
Slider
component.Just add in your layout:
You can customize the colors using these attrs:
or you can override the default colors using a custom style with the
materialThemeOverlay
attribute:with:
or use the
android:theme
attr in the layout:Example:
If you want to customize the tooltip shape you can use the
labelStyle
attribute:with: