Density issue


Last Updated:

  1. kaliki

    kaliki Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    11
    Likes Received:
    0
    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

    Joined:
    Jun 25, 2009
    Messages:
    154
    Likes Received:
    5
    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...