Scrollview

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
 

steve

Developer
Administrator
Wow. I must apologize! Funny thing is... I enabled and tested my phone being unlocked while on me... well, I disabled it later that day but I think this was collateral damage lol.
 

steve

Developer
Administrator
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.
 
Top