File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
lib/java/com/google/android/material/button Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 4141import com .google .android .material .internal .ThemeEnforcement ;
4242import com .google .android .material .internal .ViewUtils ;
4343import com .google .android .material .resources .MaterialResources ;
44+ import com .google .android .material .shape .MaterialShapeDrawable ;
4445import com .google .android .material .shape .ShapeAppearanceModel ;
4546import androidx .core .graphics .drawable .DrawableCompat ;
4647import androidx .core .view .ViewCompat ;
@@ -752,6 +753,16 @@ public void setIconGravity(@IconGravity int iconGravity) {
752753 this .iconGravity = iconGravity ;
753754 }
754755
756+ @ RestrictTo (LIBRARY_GROUP )
757+ @ Nullable
758+ protected MaterialShapeDrawable getBackgroundShapeDrawable () {
759+ if (materialButtonHelper == null ) {
760+ return null ;
761+ }
762+
763+ return materialButtonHelper .getMaterialShapeDrawable ();
764+ }
765+
755766 private boolean isUsingOriginalBackground () {
756767 return materialButtonHelper != null && !materialButtonHelper .isBackgroundOverwritten ();
757768 }
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ private void adjustShapeAppearanceModelCornerRadius(
323323 }
324324
325325 @ Nullable
326- private MaterialShapeDrawable getMaterialShapeDrawable () {
326+ MaterialShapeDrawable getMaterialShapeDrawable () {
327327 Drawable result = null ;
328328 if (rippleDrawable != null && rippleDrawable .getNumberOfLayers () > 0 ) {
329329 result = rippleDrawable .getDrawable (0 );
You can’t perform that action at this time.
0 commit comments