2307vivek / Seeker

A highly customizable seekbar/slider library for android with support for readahead indicator, segments and more. Made with Jetpack Compose ❤.
Apache License 2.0
379 stars 14 forks source link

Paddings #70

Open skillAndroid opened 3 months ago

skillAndroid commented 3 months ago

The Seeker by default has vertical and horizontal paddings, but I tried to give modifier 0.dp padding, but it still has padding. How do I remove them?? Снимок экрана 2024-08-26 185630

skillAndroid commented 3 months ago

In the image i made, like the text, the slider also has 0.dp padding from all sites but it is a little above from the bottom and horizontally it also has padding. is the problem

2307vivek commented 3 months ago

This is a desired effect. The horizontal padding on each side is equal to half of the thumb radius, if a thumb is present. This is so that the thumb doesn't overflow the boundaries of the container. The minimum height of Seeker is bounded by the size of twice the size of the ripple effect of the thumb, if the thumb is pressed which is 48 dp. This is to provide a comfortable touch area around the track.

If you want to remove the horizontal paddings on both the edges, you have to set the thumb size to 0 dp. You can change the height of the seekbar using Modifier.height() or Modifier.requiredHeight() according to the usecase.