Skip to content Skip to sidebar Skip to footer

Inflate Android.support.v4.widget.circleimageview Inflateexception

I started migrating my app to material design so I changed one of my ImageViews to android.support.v4.widget.CircleImageView and the app crashes the fact is that it can't inflate

Solution 1:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/support/v4/widget/CircleImageView.java

Says CircleImageView is a private class? Means you can't use it.

Solution 2:

If you're using Android Studio, you can just Cmd+B (using a Mac) into the class, copy and paste into a new class file and use it straight away. By right there shouldn't be any other custom attributes being used.

Solution 3:

it's package local, you can create a new class in the same namespace android.support.v4.widget that inherits CircleImageView, perhaps it may not work in future releases of the support library

package android.support.v4.widget;

publicclassMyCircleImageViewextendsCircleImageView {
     // constructors
}

Post a Comment for "Inflate Android.support.v4.widget.circleimageview Inflateexception"