@@ -359,37 +359,43 @@ public void onAnimationEnd(Animator animation) {
359
359
360
360
final AnimatorSet firstSet = new AnimatorSet ();
361
361
firstSet .playTogether (rotateButton , ring );
362
- firstSet .addListener (new AnimatorListenerAdapter () {
362
+
363
+ final AnimatorSet result = new AnimatorSet ();
364
+ result .play (firstSet ).before (lastSet );
365
+ result .addListener (new AnimatorListenerAdapter () {
363
366
@ Override
364
367
public void onAnimationStart (Animator animation ) {
368
+ mIsAnimating = true ;
369
+
365
370
if (Build .VERSION .SDK_INT < Build .VERSION_CODES .LOLLIPOP ) {
366
371
bringChildToFront (mRingView );
367
372
bringChildToFront (button );
368
373
} else {
369
- button .setCompatElevation (elevation + 2 );
374
+ button .setCompatElevation (elevation + 1 );
370
375
ViewCompat .setZ (mRingView , elevation + 1 );
376
+
377
+ for (View b : mButtons ) {
378
+ if (b != button ) {
379
+ ((FloatingActionButton ) b ).setCompatElevation (0 );
380
+ }
381
+ }
371
382
}
383
+
372
384
mRingView .setScaleX (1f );
373
385
mRingView .setScaleY (1f );
374
386
mRingView .setVisibility (View .VISIBLE );
375
387
}
376
388
@ Override
377
- public void onAnimationEnd (Animator animation ) {
378
- button .setCompatElevation (elevation );
379
- ViewCompat .setZ (mRingView , elevation );
380
- }
381
- });
382
-
383
- final AnimatorSet result = new AnimatorSet ();
384
- result .play (firstSet ).before (lastSet );
385
- result .addListener (new AnimatorListenerAdapter () {
386
- @ Override
387
- public void onAnimationStart (Animator animation ) {
388
- mIsAnimating = true ;
389
- }
390
- @ Override
391
389
public void onAnimationEnd (Animator animation ) {
392
390
mIsAnimating = false ;
391
+
392
+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP ) {
393
+ for (View b : mButtons ) {
394
+ ((FloatingActionButton ) b ).setCompatElevation (elevation );
395
+ }
396
+
397
+ ViewCompat .setZ (mRingView , elevation );
398
+ }
393
399
}
394
400
});
395
401
0 commit comments