syedowaisali / crystal-range-seekbar

538 stars 170 forks source link

How to change seekbar direction (to RTL) #117

Open rezasys2 opened 6 years ago

rezasys2 commented 6 years ago

Hello I want to use this seekbar in RTL mode (Min value be on right side). I've replaced min and max values and it works. But when I want to use setMinStartValue or setMaxStartValue, the apply function doesnt work ! I know that this function checks if min value is lower than max value. Whats best way to do it?

amalkronz commented 6 years ago

Hi there, I want to make the range seekBar RTL, how can I do this?

AlaaZarifa commented 5 years ago

@rezasys2 @amalkronz The library doesn't support RTL for the range-seekbar, but I found a way to do just that. Just set the scaleX to -1 when it's an RTL state and that's it.

code snippet

if (getAppLang().equalsIgnoreCase("ar")) {
    priceRangeSeekbar.setScaleX(-1);
 }