Update app/src/main/java/com/dkanada/gramophone/fragments/player/card/CardPlayerFragment.java

Co-authored-by: dkanada <dkanada@users.noreply.github.com>
This commit is contained in:
MitchellWT 2021-10-05 11:26:29 +11:00 committed by GitHub
commit f80adf6103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -292,7 +292,7 @@ public class CardPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
@Override
public void onPanelSlide(View view, float slide) {
// the isInfinite and isNan check fixes a bug where the app crashes dues to an invalid slide value
// the isInfinite and isNan check fixes a bug where the app crashes due to an invalid slide value
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !Float.isInfinite(slide) && !Float.isNaN(slide)) {
float density = getResources().getDisplayMetrics().density;
binding.playingQueueCard.setCardElevation((6 * slide + 2) * density);