Skip to content
Advertisement

Tag: material-components-android

Deprecation of Drawable.getOpacity()

I am getting a deprecation warning for Drawable.getOpacity(). This class (MaterialProgressDrawable) extends Drawable and implements Animatable. Since getOpacity() is abstract in the parent class (@Deprecated public abstract @PixelFormat.Opacity int getOpacity();) I can’t remove this method altogether either. What is the way out? Answer What is the way out? Well, since the javadoc implies that the method is not used anymore,

IllegalArgumentException When trying to use @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox

I am trying to stylize the TextInputLayout with an outline. But when I try to use @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox in style attribute my app crashes with this exception: Here is the TextInputLayout theme I want to use OutlinedBox It was working fine but suddenly this error appeared during development Global App Theme Answer As reported in the error: Caused by: java.lang.IllegalArgumentException: The

Persistent Bottom Sheet with rounded corners in Android crashes when used in a card view

I have created a persistent bottom sheet in android with the intent of displaying a ListView containing additional information about locations. I want the sheet to have rounded corners. I got a ton of results for modal dialog but none for persistent. Is it possible or should I use the modal version? As suggested in an answer here, I tried

Advertisement