Answers for "android studio dp to px"

0

android studio dp to px

// Converts 14 dip into its equivalent px
float dip = 14f;
Resources r = getResources();
float px = TypedValue.applyDimension(
    TypedValue.COMPLEX_UNIT_DIP,
    dip,
    r.getDisplayMetrics()
);
Posted by: Guest on May-26-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language