RangeSeekBar
RangeSeekBar copied to clipboard
Change minsdk to 21
Manifest merger fails because this library is using minSdk as 23 Can you change it to uses-sdk:minSdkVersion 21
The minSdk 23 seems to only be required by the DrawableWrapper
class usage in DrawableUtils.canSafelyMutateDrawable
static function.
But something is bothering me in its usage:
} else if (drawable instanceof DrawableWrapper) {
return canSafelyMutateDrawable(
Objects.requireNonNull(((DrawableWrapper) drawable).getDrawable()));
} else if (drawable instanceof ScaleDrawable) {
return canSafelyMutateDrawable(Objects.requireNonNull(((ScaleDrawable) drawable).getDrawable()));
}
According to Android documentation the DrawableWrapper
is a superclass of ScaleDrawable
.
So the else if (drawable instanceof ScaleDrawable)
will never be reached.
The most interesting part of this is that this DrawableUtils.canSafelyMutateDrawable
is never used.
+1 for this request
If you can change the minsdk to 21 that will be very useful to me too. I really need this slider.
The minSdk 23 seems to only be required by the
DrawableWrapper
class usage inDrawableUtils.canSafelyMutateDrawable
static function.But something is bothering me in its usage:
} else if (drawable instanceof DrawableWrapper) { return canSafelyMutateDrawable( Objects.requireNonNull(((DrawableWrapper) drawable).getDrawable())); } else if (drawable instanceof ScaleDrawable) { return canSafelyMutateDrawable(Objects.requireNonNull(((ScaleDrawable) drawable).getDrawable())); }
According to Android documentation the
DrawableWrapper
is a superclass ofScaleDrawable
.So the
else if (drawable instanceof ScaleDrawable)
will never be reached.The most interesting part of this is that this
DrawableUtils.canSafelyMutateDrawable
is never used.
Depending on this answer, if the only need for the minsdk 23 is in DrawableUtils.canSafelyMutateDrawable which is never used then you can add the following in your manifest.
<uses-sdk tools:overrideLibrary="it.sephiroth.android.library.rangeseekbar"/>
and include xmlns:tools="http://schemas.android.com/tools"
before the tag as following
<manifest ...
xmlns:tools="http://schemas.android.com/tools"
...>
@bTodary I have try it an it works. Thanks!