You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2025. It is now read-only.
I'm using ContourLayout to build a view that will be placed inside a ScrollView (with fillViewport="true"). When scrolling is not required, I'd like for the contents to be anchored to the bottom of the ScrollView.
Here is how I'm going about it (for simplicity, let's just say there are 2 children views):
But I get a CircularReferenceDetected error (at the line where I call view2.bottom() in contourHeightOf {}). I can see why that's the case: view2 references parent.bottom() and the parent references view2.bottom() in determining its height.
Everything works if I remove the contourHeightOf {} block -- in which case it's always going to be availableHeight. But this breaks the scrolling if the height of the contents is greater than availableHeight.
I'm using
ContourLayoutto build a view that will be placed inside aScrollView(withfillViewport="true"). When scrolling is not required, I'd like for the contents to be anchored to the bottom of theScrollView.Here is how I'm going about it (for simplicity, let's just say there are 2 children views):
But I get a CircularReferenceDetected error (at the line where I call
view2.bottom()incontourHeightOf {}). I can see why that's the case:view2referencesparent.bottom()and the parent referencesview2.bottom()in determining its height.Everything works if I remove the
contourHeightOf {}block -- in which case it's always going to beavailableHeight. But this breaks the scrolling if the height of the contents is greater thanavailableHeight.How do I go about this use case?