it will help u dear
Display display = getWindowManager().getDefaultDisplay();
int screenWidth = display.getWidth();
int screenHeight = display.getHeight();
float dips_120 = 120.0f;
float scale = view.this.getResources().getDisplayMetrics().density;
Hi,
Does android have any method that returns the display width in dp?
DisplayMetrics only seems to return the scale factor and exact pixels as
far as I could tell from the docs, or did I miss something?
If not, is there an exact formula I could use to calculate the display
width in dp?
Thanks
http://developer.android.com/guide/practices/screens_support.html#dips-pels
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Fri, Jun 22, 2012 at 9:11 AM, Raghav Sood raghavs...@gmail.com wrote:
Hi,
Does android have any method that returns the
3 matches
Mail list logo