lukelorusso / VerticalSeekBar

[AndroidLib] A nicer, redesigned and vertical SeekBar for Android 🎛
Apache License 2.0
261 stars 27 forks source link

thumb placeholder position #9

Closed EvaniRam closed 4 years ago

EvaniRam commented 4 years ago

Is there any way to adjust the thumb / slider position in between minimum and max of the bar .Currently thumb placeholder is center.

val thumbHalfHeight = if (showThumb) thumb.measuredHeight / 2 else 0

lukelorusso commented 4 years ago

Sorry, I don't understand the question. Can you elaborate? Consider that the thumb position depends on the progress value.

EvaniRam commented 4 years ago

Hi Lukelorusso, Thanks for the quick reply. My question is : When the thumb reaches max (100) or min (0) , the thumb image is slightly outside the bar.Is there any way to adjust the thumb position so that it would not cross the bar or stays in between the range of min and max.

image

image

lukelorusso commented 4 years ago

Ok I see your point. The simple answer is "it's not possible". But since yours it's more of a "graphical need" than a missing functionality lemme tell you what you can do: you may define a max_placeholder and a min_placeholder, use the same resource as the one for your bar and play with their positions (inside/outside/middle). This way you can get the same graphical result using a different approach !