3232import android .graphics .PorterDuff .Mode ;
3333import android .graphics .Rect ;
3434import android .graphics .drawable .Drawable ;
35+ import android .os .Build ;
36+ import android .os .Build .VERSION_CODES ;
3537import android .os .Bundle ;
3638import android .os .Parcelable ;
3739import androidx .appcompat .widget .AppCompatDrawableManager ;
@@ -837,13 +839,9 @@ protected void onDetachedFromWindow() {
837839 @ Override
838840 protected void drawableStateChanged () {
839841 super .drawableStateChanged ();
840- getImpl ().onDrawableStateChanged (getDrawableState ());
841- }
842-
843- @ Override
844- public void jumpDrawablesToCurrentState () {
845- super .jumpDrawablesToCurrentState ();
846- getImpl ().jumpDrawableToCurrentState ();
842+ if (Build .VERSION .SDK_INT == VERSION_CODES .LOLLIPOP ) {
843+ getImpl ().onDrawableStateChangedForLollipop ();
844+ }
847845 }
848846
849847 @ Override
@@ -1363,7 +1361,7 @@ public void setHideMotionSpecResource(@AnimatorRes int id) {
13631361 /** Add a {@link TransformationCallback} which can watch for changes to this view. */
13641362 public void addTransformationCallback (
13651363 @ NonNull TransformationCallback <? extends FloatingActionButton > listener ) {
1366- getImpl ().addTransformationCallback (new TransformationCallbackWrapper (listener ));
1364+ getImpl ().addTransformationCallback (new TransformationCallbackWrapper <> (listener ));
13671365 }
13681366
13691367 /**
@@ -1372,7 +1370,7 @@ public void addTransformationCallback(
13721370 */
13731371 public void removeTransformationCallback (
13741372 @ NonNull TransformationCallback <? extends FloatingActionButton > listener ) {
1375- getImpl ().removeTransformationCallback (new TransformationCallbackWrapper (listener ));
1373+ getImpl ().removeTransformationCallback (new TransformationCallbackWrapper <> (listener ));
13761374 }
13771375
13781376 class TransformationCallbackWrapper <T extends FloatingActionButton >
@@ -1449,7 +1447,7 @@ public void setShadowPaddingEnabled(boolean shadowPaddingEnabled) {
14491447
14501448 private FloatingActionButtonImpl getImpl () {
14511449 if (impl == null ) {
1452- impl = new FloatingActionButtonImplLollipop (this , new ShadowDelegateImpl ());
1450+ impl = new FloatingActionButtonImpl (this , new ShadowDelegateImpl ());
14531451 }
14541452 return impl ;
14551453 }
0 commit comments