syedowaisali / crystal-range-seekbar

537 stars 164 forks source link

Some lag in the view while seekbar change happen #55

Closed Gkundu1 closed 6 years ago

Gkundu1 commented 7 years ago

Hi, Recently implement the crystal-range-seekbar in my project inside dialog. Now everything work fine until we move the left or right icon in order to change the value of min and max. During the seekbar min and max change operation the seek is not smooth and some lag while moving left or right end of the seekbar. Providing the code snippet for seekbar config

pricerangebar.setCornerRadius(10f) .setBarColor(Color.parseColor("#93F9B5")) .setBarHighlightColor(Color.parseColor("#16E059")) .setMinValue(0) .setMaxValue(10000) .setSteps(100) .setLeftThumbDrawable(R.mipmap.dicrease) .setLeftThumbHighlightDrawable(R.mipmap.dicrease) .setRightThumbDrawable(R.mipmap.increase) .setRightThumbHighlightDrawable(R.mipmap.increase) .setDataType(CrystalRangeSeekbar.DataType.INTEGER) .apply();

pricerangebar.setOnRangeSeekbarChangeListener(new OnRangeSeekbarChangeListener() { @SuppressLint("SetTextI18n") @Override public void valueChanged(Number minValue, Number maxValue) { minproductPrice=minValue.toString(); maxproductPrice=maxValue.toString(); txt_priceminvalue.setText("From "+minValue); txt_pricemaxvalue.setText("To "+maxValue); } });

Is there any more configuration or setting available with seekbar to make it smooth scroll on both left and right end Please provide some guideline or help to resolve this problem.

syedowaisali commented 6 years ago

.setMaxValue(10000) .setSteps(100) .setLeftThumbDrawable(R.mipmap.dicrease)

change to

.setMaxValue(10000) .setLeftThumbDrawable(R.mipmap.dicrease)