Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing in Android 4.3 #330

Open
jabi1995 opened this issue Oct 16, 2019 · 1 comment
Open

Crashing in Android 4.3 #330

jabi1995 opened this issue Oct 16, 2019 · 1 comment

Comments

@jabi1995
Copy link

Error inflating when using in android 4.3

@jabi1995
Copy link
Author

jabi1995 commented Oct 16, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant