Questions tagged [fragment-transitions]

51 questions
3
votes
2 answers

Fragment enter and exit transitions are not executed at the same time

Running a simple slide to the left animation for both entering and existing fragment produces the effect of the entering fragment slightly overlapping with the exit fragment. This leads me to think that both transition are not executed at the same…
3
votes
0 answers

Fragment Transition - postpone until RecyclerView has laid out relevant elements

I'm postponing transition between two fragments which both contain RecyclerViews with the trick of creating a fragment, hiding it and only show it when the RecyclerView is ready... Like explained very well here:…
3
votes
0 answers

How can I postpone a fragment to a fragment transition like the activity transition (postponeEnterTransition

How to postpone a Fragment's enter transition in Android Lollipop? I have the troubles in the fragment transition. (shared element transition and so on.) I want to make the fragment transition with screen orientation also well done. After many…
3
votes
1 answer

Reveal Transition for replace Fragment

I have an activity which has Fragment StatsDetailFragment loaded by default. On press of a button, I'm replacing the fragment with another using the following code. getSupportFragmentManager().beginTransaction() …
2
votes
0 answers

Fragment Animation (Enter/Exit transition) in Navigation Component with Bottom Navigation View reloads when Tabs switched

I have a Bottom Navigation View with 5 Tabs and each tab has its own NavGraph. Lets assume I'm navigation with Tab1 through Fragment1 -> Fragment2 -> Fragment3 There is custom enter/exit transitions to each route (i.e. from Fragment1 -> Fragment2 ->…
2
votes
0 answers

Android fragment transition: call postponeEnterTransition() only when necessary

I am studying to use fragment transitions, and the basic sample works fine for me. My request is simple, I have a pager fragment, which is the destination of many other navigation fragments. So I want to do postponeEnterTransition() and…
Robin
  • 10,052
  • 6
  • 31
  • 52
2
votes
0 answers

Android Fragment Shared Element transition without fragmentTransaction.replace()

I can not do exactly what I want with the transitions to the initialization of my fragments: val fragmentTransaction = fragmentManager.beginTransaction() val fragments = fragmentManager.fragments if (fragments.isNotEmpty()) for…
Rémy
  • 313
  • 3
  • 17
2
votes
0 answers

Android Fragment onCreateAnimator enter always true

I am facing this problem on htc desire 4.0.3. The animation is always enter, even when fragment is exiting....the problem doesnt exist on 4.4 or 5.0 public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) { Animator anim; …
1
vote
1 answer

Shared element transition - number of views

Does a shared element transition from one view to another need to contain the same amount of child views? My experience is that the following crash appears if this is not the case: java.lang.IndexOutOfBoundsException: Index: 5, Size: 5 at…
1
vote
1 answer

Android multiple shared elements not working with fragments

I want to transition between fragments with two shared elements. But the problem is: only one gets animated. The shared elements are taken from a viewHolder from list in the first fragment. The transitions I use are from Material library, exactly…
1
vote
0 answers

Moving a view using Transition framework

I'm trying to create an animation similar to translateX/translateY using Transition framework in xml. While navigating from fragment A to B, B has some views which needs to be moved from a different position (within the screen bounds) than the final…
1
vote
2 answers

Android - blank screen while fragment transition

I use custom fragment animations. xml files are below: Bottom to top:
1
vote
1 answer

Fragment to Fragment Transition: postponeEnterTransition() does not work

I am using Android X transitions to animate content with motion between two Fragments, within the same hosting Activity. I am trying to animate an ImageView which Image is loaded with Glide and an URL. The problem I have is, regardless of the two…
1
vote
0 answers

How to implement interactive vertical Fragment transitions that follow swipe/touch?

I'm trying to do a sort of infinite scroll. Each Fragment contains a scrolling WebView (or ScrollView), and when the user hits the bottom, I'd like to test for continued swiping to reveal the next Fragment below. The user should not be able to go…
ray
  • 1,966
  • 4
  • 24
  • 39
1
vote
0 answers

Old fragment is on top after pressing home button mid-animation

I have fragments transitioning in Activity with animation. I noticed that when I press home button while animation is played, and come back using app locker, the fragment I was transitioning from is on top of new one, and is there until activity is…
hubert
  • 923
  • 2
  • 9
  • 18