• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Density issue

kaliki

Newbie
Does anyone know how to get/calculate display density on android 1.5.
I created my app using displaymetrics.densityDpi and it works fine on 1.6+
but now i need to make it compatible with 1.5...any ideas ?
Tnx
 
Does anyone know how to get/calculate display density on android 1.5.
I created my app using displaymetrics.densityDpi and it works fine on 1.6+
but now i need to make it compatible with 1.5...any ideas ?
Tnx

I used this formula but it's approximative to convert dpi to pix using 1.1 framework.

40pix = ((40 *getResources().getDisplayMetrics().density) + 0.5f);

Hope this will help
 
Back
Top Bottom