I've got a view that basically contains a title, subtitle and some text that could be very long. I would like the whole view to be scrollable, not just the TextView that is long so the experience is smooth.
How should I do this?
you could use a container
View with the flex layout engine enabled and with the
Auto Content Size property set to the
Flex value. Then put three
Label controls inside the container
View, one for the title, one for the subtitle and one with the multiline option flagged for the long text; each one with flex enabled. The content size of the container
View will automatically adjust with the space needed by the three inner controls. Just adjust the padding and the margin from the flex inspector of the controls.
Please see the attached example:
Works great @andrea. Thanks for having taken the time to create an example. I wasn't familiar with Flex.
As a side note though, I discovered that fonts behave very differently and I don't think this is normal. Please see attached the same kind of example where the content text is in Helvetica Neue. If you change it to Helvetica, it creates a huge padding on top of the text. I don't think this is normal. See screenshots below.