AndroidPicker
AndroidPicker copied to clipboard
ImagePicker导致fragment自定义的入场动画失效
supportFragmentManager.beginTransaction() .setCustomAnimations( R.anim.translate_enter_bottom_to_top, R.anim.translate_exit_top_to_bottom, R.anim.translate_pop_enter, R.anim.translate_exit_top_to_bottom ) .add(R.id.contentContainer, editCommentFragment, EditCommentFragment::class.simpleName) .addToBackStack(null) .commitAllowingStateLoss() 引入ImagePicker后,执行类似上面的代码,R.anim.translate_enter_bottom_to_top这个动画没有执行,去掉ImagePicker后就正常了
@wangsanpiao ImagePicker是在EditCommentFragment里调用?还是在EditCommentFragment所在的Activity调用?
既没在EditCommentFragment里调用,也没在EditCommentFragment所在的Activity调用,是在另一个无关的fragment调用的,所以怀疑集成了就有所影响
既没在EditCommentFragment里调用,也没在EditCommentFragment所在的Activity调用,是在另一个无关的fragment调用的,所以怀疑集成了就有所影响
有可能和fragment包的版本有关吧,ImagePicker集成的是androidx.fragment:fragment:1.3.4
def fragment_version = "1.3.4"
// Java language implementation
implementation "androidx.fragment:fragment:$fragment_version"
// Kotlin
implementation "androidx.fragment:fragment-ktx:$fragment_version"
入场动画还是失效