I have a bottomsheetDialogFragment having a nested scroll view having few texts as its child.
I have set the height of the parent layout to WRAP_CONTENT because I want to show the bottom sheet depends upon the height of the textView.
But if the Textview is large enough, it covers the whole screen. I want to show the bottom sheet up to a particular height and if the text view is small then it should follow WRAP_CONTENT. I have searched through the SO and not find a single answer to my query.
I could do another thing, I just measure the height of the text view before layout puts it and then decides the height dynamically. But I am amazed to see that there is no simple solution for this like the max height of the bottom sheet.