Home  >  Forum  >  Android
Post New Query

Android dp to pixel conversion


joined on
August 11,2014
Asked on September 15,2015
How to convert dp into pixel in android.
joined on
October 10,2013
Replied on September 15,2015

Follow below step.

int valueInDp = 400;
int valueInPx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 
valueInDp, activity.getResources().getDisplayMetrics());
joined on
August 11,2014
Replied on September 15,2015

Thanks.

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us