Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Change list view's height progmmatically..?

I want to know how to change height of the list view programmatically.

Is it possible to change the child items height for individual list item...?

like image 615
Noby Avatar asked Sep 16 '11 07:09

Noby


1 Answers

    ViewGroup.LayoutParams params = listView.getLayoutParams();
    params.height = whatYouWant;
    listView.setLayoutParams(params);
    listView.requestLayout();
like image 79
thpitsch Avatar answered Oct 02 '22 18:10

thpitsch