syedowaisali / crystal-range-seekbar

538 stars 170 forks source link

Cannot set custom thumb XML drawable #79

Closed SebSob closed 6 years ago

SebSob commented 6 years ago

Type: CrystalRangeSeekbar

Problem Can't set a custom .xml thumb drawable. (Problem for both XML as Java)

Code

rangeSeekBar = findViewById(R.id.rangeSeekBar);
rangeSeekBar.setLeftThumbDrawable(R.drawable.custom_rangeseekbar_thumb);

Error log Caused by: java.lang.ClassCastException: android.graphics.drawable.LayerDrawable cannot be cast to android.graphics.drawable.BitmapDrawable at com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar.getBitmap(CrystalRangeSeekbar.java:485)

Any idea?

mxl commented 6 years ago

Duplicate of #14

syedowaisali commented 6 years ago

XML drawable not supported yet