I want create listview without layout_height. I mean if there is 100 item in listview, no need to create scrolling. it just have to take place so many height as it need. Is there a way to do this?
Anytime I add items the listView height should increase but no need scrolling.
I want create listview without layout_height. I mean if there is 100 item in
Share
You have to do this programatically:
After knowing how many entries you got you have to manuallay set the layout_height in Java code to
(getWindowManager().getDefaultDisplay().getHeight() / number_of_entries).But I still don’t get why you want to do that. If you got 100 entries on a Nexus S you got 8 Pixel for each entry. Way to less to read or klick them precicely.