Seeker icon indicating copy to clipboard operation
Seeker copied to clipboard

Paddings

Open skillAndroid opened this issue 1 year ago • 2 comments

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 avatar Aug 26 '24 13:08 skillAndroid

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

skillAndroid avatar Aug 26 '24 13:08 skillAndroid

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.

2307vivek avatar Aug 27 '24 12:08 2307vivek