boformer
boformer
Sep 1, 2018 · 1 min read

Beautiful! Exactly the same approach I was using.

Beware though that the CompositedTransformFollower has a critical disadvantage:

When there are many dropdown items, the dropdown will exceed the screen space at some point (especially when the keyboard is open), and you will have to add scrolling.

To do that you have to know exactly how much space is available, in the layout phase. For example if there were 100 units of vertical space below the target, you would create a 90 unit high container (10 units margin) for the scroll view.

Now the problem is that CompositedTransformFollower only applies the transformation during the painting phase, and there is no way to obtain the current position of the target (which could be used to calculate the remaining space) during the layout phase.

    boformer

    Written by

    boformer