Merge "Add additional fake task views on overview gesture completion."

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2020-12-23 01:34:00 +00:00
commit 618ba37e04
7 files changed
+106 -13

No files matched your search

+5
View File
@@ -404,6 +404,11 @@ public final class Utilities {
return (size / densityRatio);
}
/** Converts a dp value to pixels for the current device. */
public static int dpToPx(float dp) {
return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
}
public static int pxFromSp(float size, DisplayMetrics metrics) {
return (int) Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,
size, metrics));