Answers for "adjust padding view"

0

adjust padding view

float scale = getResources().getDisplayMetrics().density;
int dpAsPixels = (int) (sizeInDp*scale + 0.5f);
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language