get Density Dpi - Android android.app

Android examples for android.app:Display

Description

get Density Dpi

Demo Code

import android.content.Context;

public class Main {

  public static float getDensityDpi(Context context) {
    return context.getResources().getDisplayMetrics().densityDpi;
  }//from   www  .  j av a 2 s .  c  o m

}

Related Tutorials