Added check for slide value
This commit is contained in:
parent
cac64c53c7
commit
1b3efb515c
1 changed files with 2 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ public class CardPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPanelSlide(View view, float slide) {
|
public void onPanelSlide(View view, float slide) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
|
||||||
|
&& !(Float.isInfinite(slide) || Float.isNaN(slide))) {
|
||||||
float density = getResources().getDisplayMetrics().density;
|
float density = getResources().getDisplayMetrics().density;
|
||||||
binding.playingQueueCard.setCardElevation((6 * slide + 2) * density);
|
binding.playingQueueCard.setCardElevation((6 * slide + 2) * density);
|
||||||
playbackControlsFragment.binding.playerPlayPauseFab.setElevation((2 * Math.max(0, (1 - (slide * 16))) + 2) * density);
|
playbackControlsFragment.binding.playerPlayPauseFab.setElevation((2 * Math.max(0, (1 - (slide * 16))) + 2) * density);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue