Answers for "set dp to view"

0

set dp to view

final float scale = getContext().getResources().getDisplayMetrics().density;
int pixels = (int) (dps * scale + 0.5f);
Posted by: Guest on December-28-2020

Browse Popular Code Answers by Language