Fixed reveal animation, updated gradle plugin
This commit is contained in:
parent
e709455fb1
commit
09ab843309
2 changed files with 4 additions and 3 deletions
|
|
@ -224,9 +224,10 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
||||||
slidingUpPanelLayout.setBackgroundColor(lastColor);
|
slidingUpPanelLayout.setBackgroundColor(lastColor);
|
||||||
Animator backgroundAnimator;
|
Animator backgroundAnimator;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
int topMargin = getResources().getDimensionPixelSize(R.dimen.status_bar_padding);
|
||||||
int x = (int) (playbackControlsFragment.playPauseFab.getX() + playbackControlsFragment.playPauseFab.getWidth() / 2 + playbackControlsFragment.getView().getX());
|
int x = (int) (playbackControlsFragment.playPauseFab.getX() + playbackControlsFragment.playPauseFab.getWidth() / 2 + playbackControlsFragment.getView().getX());
|
||||||
int y = (int) (playbackControlsFragment.playPauseFab.getY() + playbackControlsFragment.playPauseFab.getHeight() / 2 + playbackControlsFragment.getView().getY());
|
int y = (int) (topMargin + playbackControlsFragment.playPauseFab.getY() + playbackControlsFragment.playPauseFab.getHeight() / 2 + playbackControlsFragment.getView().getY());
|
||||||
float startRadius = 0;
|
float startRadius = Math.max(playbackControlsFragment.playPauseFab.getWidth() / 2, playbackControlsFragment.playPauseFab.getHeight() / 2);
|
||||||
float endRadius = Math.max(colorBackground.getWidth(), colorBackground.getHeight());
|
float endRadius = Math.max(colorBackground.getWidth(), colorBackground.getHeight());
|
||||||
colorBackground.setBackgroundColor(newColor);
|
colorBackground.setBackgroundColor(newColor);
|
||||||
backgroundAnimator = ViewAnimationUtils.createCircularReveal(colorBackground, x, y, startRadius, endRadius);
|
backgroundAnimator = ViewAnimationUtils.createCircularReveal(colorBackground, x, y, startRadius, endRadius);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.0.0-alpha2'
|
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
|
||||||
classpath 'com.github.triplet.gradle:play-publisher:1.1.3'
|
classpath 'com.github.triplet.gradle:play-publisher:1.1.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue