Questions tagged [fragment-animation]

This explains how the fragments will get animated in their life cycle ( specifically during attaching and detaching ) . We can use different animations to make the fragment attaching and detaching process look elegant and make the fragment attach and detach more meaningful and materialistic.

9 questions
18
votes
2 answers

Nested fragments transitioning incorrectly

Hello good programmers of stack overflow! I've spent a good week with this problem and am now very desperate for a solution. The scenario I'm using android.app.Fragment's not to be confused with the support fragments. I have 6 child fragments…
16
votes
1 answer

Replacing fragments have wrong elevation value

Hello again stack overflowians. I have another fragment question. (I'm using android.app.Fragment not Support Fragments) I'm trying to replace a fragment. But this isn't as simple as using: fragmentTransaction .replace(containerId, newFragment) …
2
votes
1 answer

Exo Player becomes black when animating the container fragment, How to fix it?

I have an Exoplayer view in a fragment, when I animate the fragment container view from the activity the exo player will become black. I used setKeepContentOnPlayerReset(true); to keep the last frame and it's working fine. But when I call the…
0
votes
0 answers

Android Fragment Navigation - layout flicker before animation starts

I am using jetpack navigation to navigate between two fragments and I also want to have an animation. I added the following animation: onEnterAnim: slide_in_right.xml
0
votes
0 answers

How is the fragment animation in Dribbble app implemented?

I was browsing through Dribbble Android app and I immediately noticed the smoothness of the fragment animation when a new fragment is added over. Basically the fragment behind translates a bit towards the left side while the new fragment translates…
0
votes
0 answers

How to navigate from MainActivity to Fragment with animation using Navigation Controller

I'm using Nav Graph for navigation and can easily animate transitions between fragments using xml 's action. I'm required to navigate from MainActivity to Fragment on fab pressed. I can do this by using navigation controller fab.setOnClickListener…
0
votes
1 answer

Crash after BottomNavigation click while animation is still fading in/out

I have BottomNavigation and 4 fragments. The App crashes after I click on the BottomNavigation symbols but only if the animation (fade in/out) is still in process. If I disable the animation in my code like shown:…
0
votes
0 answers

How do I make a slide up fragment for share button?

Can anyone suggest me from where should I start to make a slide up animation of fragment when user clicks on share button? Fragment will contain screenshot of the current view and the app where we can share. Here's a example from ixigo app after…
0
votes
1 answer

How to interrupt dialog animation?

I have the Dialog fragment with dialog, that have such animation: dialog.window.setWindowAnimations(R.style.RemoveWishlistAnimation) In this style exit animation has long duration, so if user pressed HOME button, some part of animation will be…