Android pop fragment from backstack with animation

前端 未结 3 1149
天命终不由人
天命终不由人 2021-02-19 04:52

I have an activity that loads a Fragment A in it. Fragment A contains ListView and when clicking on list item I load another Fragment B in place of Fragment A to show the listvi

3条回答
  •  花落未央
    2021-02-19 05:15

    With navigation component is very easy too:

            app:enterAnim="@anim/slide_in_left"
            app:exitAnim="@anim/slide_out_right"
            app:popEnterAnim="@anim/slide_in_right"
            app:popExitAnim="@anim/slide_out_left"
    

提交回复
热议问题