How do I set a circular image as one of the sub item
Hello , I want to show a fully filled imageView(User's profile pic) in one of the sub items. but it is giving me an exception :
android.view.InflateException: Binary XML file line #140: de.hdodenhof.circleimageview.CircleImageView cannot be cast to com.github.clans.fab.FloatingActionButton
How do I do that ?
FloatingActionButton extends ImageView from the Android framework so it cannot be casted to de.hdodenhof.circleimageview.CircleImageView, which in fact the exception message actually says.
If you want to set a circular image to one of FloatingActionButton in the menu, you should use some sort of CircularImageDrawable which will perform rounding of the associated bitmap when drawing it and set that drawable to the desired FAB.