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
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));
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
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;
4 matches
Mail list logo