File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
lib/java/com/google/android/material/bottomsheet Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -747,12 +747,14 @@ void setStateInternal(@State int state) {
747747
748748 private void updateDrawableOnStateChange (@ State int state ) {
749749 if (materialShapeDrawable != null ) {
750- if (state == STATE_EXPANDED && ( parentHeight <= viewRef . get (). getHeight ()) ) {
750+ if (state == STATE_EXPANDED ) {
751751 // If the bottomsheet is fully expanded, change ShapeAppearance to sharp corners to
752752 // indicate the bottomsheet has no more content to scroll.
753753 // Overriding of this style may be performed in the bottomsheet callback.
754- materialShapeDrawable .getShapeAppearanceModel ().setCornerRadius (0 );
755- materialShapeDrawable .invalidateSelf ();
754+ ShapeAppearanceModel shapeAppearanceModelExpanded =
755+ new ShapeAppearanceModel (shapeAppearanceModelDefault );
756+ shapeAppearanceModelExpanded .setCornerRadius (0 );
757+ materialShapeDrawable .setShapeAppearanceModel (shapeAppearanceModelExpanded );
756758 }
757759 if (state == STATE_COLLAPSED || state == STATE_DRAGGING ) {
758760 materialShapeDrawable .setShapeAppearanceModel (shapeAppearanceModelDefault );
You can’t perform that action at this time.
0 commit comments