[android-developers] Re: How to get the height width of emulator in android

2010-09-16 Thread grace
getWindowManager().getDefaultDisplay().getWidth() and getWindowManager().getDefaultDisplay().getHeight() On Sep 16, 3:20 pm, RKJ (Android developer) rkjhaw1...@gmail.com wrote: Hi all, I want to get the height width of emulator (which will reflect in device also). --RKJ -- You received

Re: [android-developers] Re: How to get the height width of emulator in android

2010-09-16 Thread Rocky
Hi, thanks for replay, but its not reflecting in my case --- I want to set the height of ListView = 330 (in emulator case) i.e 65% of total view (height) ListView l1 = (ListView) findViewById(R.id.ListView01); l1.setAdapter(new EfficientAdapter(this));

[android-developers] Re: How to get the height width of emulator in android

2010-09-16 Thread viktor
try using dip or dp insted px. many devices have different density, height will be in emulator and device list_height = list_height*65/100; list_height *= getResources().getDisplayMetrics().density; //you always have dinamic height on different devices -- You received this message because you

Re: [android-developers] Re: How to get the height width of emulator in android

2010-09-16 Thread Rocky
thanks dude. On Fri, Sep 17, 2010 at 12:34 AM, viktor victor.scherb...@gmail.com wrote: try using dip or dp insted px. many devices have different density, height will be in emulator and device list_height = list_height*65/100; list_height *= getResources().getDisplayMetrics().density;