floatingsearchview
floatingsearchview copied to clipboard
Crashing in Android 4.3
Error inflating when using in android 4.3
Finally Found the answer This bug is for android sdk versions below 18, In order to correct this problem go through below instruction:
- Download source code
- Search for Util.class and xml files
- Find getWrapperdDrawable method in Util.class
- Replace this method with
public Drawable drawableGetter (@DrawableRes int id) {
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.LOLLIPOP) {
return AppCompatResources.getDrawable(getContext(), id);
}
return ContextCompat.getDrawable(getContext(), id);
}
-
Find any CardView in xml files and add below attributes to them app:cardPreventCornerOverlap="false" app:cardMaxElevation="0dp" app:cardElevation="0dp"
-
In Util.class find getHostActivity method and change return value of method to AppCompatActivity and do the necessary changes.