I am using a scrollView having a linear layout and a ListView. initially the size of scroll view is 0 i.e height. whenever i run the code, ListView displays elements and scroll view height increases. but when ListView is emptied, size of scroll view remains as it is as it was stretched to.
I use scrollTo(0,0)
to get to top, but i want to resize the scrollView as it was initially. can somebody tell me how to do so? thanks.
p.s: i also used setLayoutParams(new RelativeLayout.LayoutParams(0,0));
but that completely removed the linear layout withen the scroll view.