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
Post a Comment