I have xml listview. How I can change its height in activity?
I know that this code:
list.setLayoutParams(new LinearLayout.LayoutParams(200, 600));
means that my listview will have 200 width and 600 height, but how can I change only height in activity? I want do this because I want to width fill parent but height my list I want my own and dynamically counting.
if width is
FILL_PARENTlist.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,600));
width is
WRAP_CONTENTlist.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,600));