Add experimental bottom sheet player

This commit is contained in:
Antonio Cappiello 2020-12-05 21:31:12 +01:00
parent 9af0afa441
commit f837bb14e2
65 changed files with 1570 additions and 547 deletions

View file

@ -1,5 +1,7 @@
package com.cappielloantonio.play.util;
import android.content.Context;
import java.util.Locale;
public class Util {
@ -15,4 +17,12 @@ public class Util {
return String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, seconds);
}
}
public static float dpFromPx(final Context context, final float px) {
return px / context.getResources().getDisplayMetrics().density;
}
public static float pxFromDp(final Context context, final float dp) {
return dp * context.getResources().getDisplayMetrics().density;
}
}