What is the benefit of fillViewPort
?
In ScrollView
, sometimes fillViewPort
needs to be set to true
so that the view gets displayed properly, and other times it's not needed at all.
And the documentations' description of it is not really clear
android:fillViewport
Defines whether the scrollview should stretch its content to fill the viewport.
fillViewport
allows scrollView
to extend it’s height equals to the full height of device screen’s height in the cases when the child of scroll view has less height.
Thank for Hardik Parsania for this helpful post