• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Scrollview

Aayush Kumar

Lurker
Jul 31, 2017
4
0
Hi All,

I am building an application that consists of scrollview which in turn consists of a linearlayout.But I am seeing that the scrollview gets finished before linearlayout finishes.Mind you fillviewport is set to "true" for scrollview.
How to achieve the scrollview height equal to linearlayout height.

Regards,
Aayush Kumar
 
Hi All,

I am building an application that consists of scrollview which in turn consists of a linearlayout.But I am seeing that the scrollview gets finished before linearlayout finishes.Mind you fillviewport is set to "true" for scrollview.
How to achieve the scrollview height equal to linearlayout height.

Regards,
Aayush Kumar

Lots of weird issues can happen with ScrollViews. Could you post your layout and maybe some code snippets? One thing you could quickly do is try to invalidate the ScrollView which should redraw the children. If you have some complex scenario you may need to getMeasuredHeight() of the LinearLayout and manually set the ScrollView height (but that seems like more effort than you should need if the code is setup correctly.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones