1. Download our Official Android App: Forums for Android!

Apps Android Screen Denisty

Discussion in 'Android Development' started by Downie, Jun 21, 2010.

  1. Downie

    Downie Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jun 21, 2010

    Jun 21, 2010
    1
    0
    5
    I was wondering if anyone else was having this problem or whether I was doing something wrong.

    I am trying to get the density of my device so I can position some UI in OpenGL. I am using the Motorola Milestone and know that it has a density of ~1.5. If I use a hard-coded density of 1.5 then my UI works correctly. However if I call getResources().getDisplayMetrics().density from context, it always returns a value of 1.

    Any ideas?

    Thanks in advance
     

    Advertisement

Share This Page

Loading...