oli107 / material-range-bar

Android widget for selecting a range of values.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can bar be rendered without padding?

ShahnazK opened this issue · comments

i am using range bar in a dialog box, but there is some alignment issue with other components as i am using linear layout. Every other component starts from base line except range bar. It seems there is some internal padding. Is there any way i can remove or reset that padding? please see the attached screen shot
rangebar

right now i am setting android:layout_marginStart="-10dp" to align with other components.

yes this is possible. you just need to set the custom:rangeBarPaddingBottom property for rangebar. But keep in mind that custom:selectorSize should never be more than custom:rangeBarPaddingBottom otherwise the selectors will be truncated from bottom.

I have a question related to this. what if I want to remove the top padding? I already set the pin radius to 0 to disable the pin, but it seems the space of it is still accounted in the layout. Anyway we can take that out? Thanks.

just set view height to 50dp or something that fits you

thanks