如何获取片段之间的过渡完成回调

问题描述

所以这个问题很相似:How to know when enter transition ended on Fragment?


但是我自己没有设置过渡,这不是共享过渡。因此我无法获得用于附加侦听器的过渡对象。


背景:

我使用了B@R_502_6452@omSheetDialogFragment,它在幕后使用具有自己过渡效果的样式

<item name="android:windowAnimationStyle">
  @style/Animation.MaterialComponents.B@R_502_6452@omSheetDialog
</item>
<style name="Animation.MaterialComponents.B@R_502_6452@omSheetDialog" parent="Animation.AppCompat.Dialog">
  <item name="android:windowEnteranimation">@anim/mtrl_b@R_502_6452@om_sheet_slide_in</item>
  <item name="android:windowExitAnimation">@anim/mtrl_b@R_502_6452@om_sheet_slide_out</item>
</style>

我想要的是在过渡完成后添加动画。由于同时播放动画和过渡是没有用的

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)