I have a custom DialogFragment which I want to change its max_height dynamically according to its view's content size (wrap content).
I don't want the update of the max_height to cause a jump in the UI so I planned to do it very early in the view's life cycle: onMeasure().
But how can I then notify the containing dialog or dialogFragment?
From Dialog fragment I can get its hosted view, but I cannot register it's onMeasure() event.
From the view I can write code in the onMeasure() method, but how will I get a reference to its containing dialog?
I saw this post, but chnging the hight at the onResume() will cause a slagish UI (jump after the UI is seen)