floatingsearchview icon indicating copy to clipboard operation
floatingsearchview copied to clipboard

Crashing in Android 4.3

Open jabi1995 opened this issue 5 years ago • 1 comments

Error inflating when using in android 4.3

jabi1995 avatar Oct 16 '19 06:10 jabi1995

Finally Found the answer This bug is for android sdk versions below 18, In order to correct this problem go through below instruction:

  1. Download source code
  2. Search for Util.class and xml files
  3. Find getWrapperdDrawable method in Util.class
  4. 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);

}

  1. Find any CardView in xml files and add below attributes to them app:cardPreventCornerOverlap="false" app:cardMaxElevation="0dp" app:cardElevation="0dp"

  2. In Util.class find getHostActivity method and change return value of method to AppCompatActivity and do the necessary changes.

jabi1995 avatar Oct 16 '19 10:10 jabi1995