I need to translate dialog from current position to top as exit animation. In the presence of keyboard it will be available at top and should translate and exit from that position, incase if keyboard is not visible it will be in centre and should exit from there.
Tried the below snippet:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillBefore="true"
android:fillEnabled="true">
<translate
android:duration="400"
android:toYDelta="-100%p"
/>
</set>
In this case when the dialog is not at centre (when keyboard is visible), it comes down once (to its centre position) and then translates up. This causes flickering. What am i doing wrong? How to translate smoothly