android- How to get the width and height of the list view dynamically -


in application want display list view using adapter. want current height , width of list view (means after generating list using adapter). how it. can me.

thanks

use getwidth() , getheight() method of listview in onwindowfocuschanged width , height.

@override public void onwindowfocuschanged(boolean hasfocus) {     super.onwindowfocuschanged(hasfocus);       system.out.println("width:" + listview.getwidth());     system.out.println("height:" + listview.getheight());  } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -