1. Check out our companion app, Forums for Android! Download from Google Play

Density issue

Discussion in 'Application Development' started by kaliki, Mar 22, 2010.

  1. kaliki

    kaliki Member
    Thread Starter
    15

    Jan 21, 2010
    11
    0
    15
    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
     

    Advertisement

  2. loick

    loick Well-Known Member
    36

    Jun 25, 2009
    154
    5
    36
    Paris
    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
     

Share This Page

Loading...