MCPcopy Create free account
hub / github.com/HuberHaYu/HXPlayer / dpToPx

Method dpToPx

OpenSource/Animation_basic_logic/HeightDrop.java:22–24  ·  view source on GitHub ↗
(int dp)

Source from the content-addressed store, hash-verified

20 }
21
22 private int dpToPx(int dp) {
23 return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
24 }
25
26 public void animateViewHeight(View view, int startHeightDp, int endHeightDp, long duration) {
27 if (view.getAnimation() != null && view.getAnimation().hasStarted()) {

Callers 1

animateViewHeightMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected