Questions tagged [fragment-transitions]

51 questions
44
votes
3 answers

Fragment shared element transition with add() instead of replace()?

I am trying to make a shared element transition between fragments, everything works fine when using replace() to add the second fragment, however in the codebase add() is used a lot, but when using that, transition just skips to end values Is it…
urSus
  • 12,492
  • 12
  • 69
  • 89
29
votes
3 answers

shared element transition works with FragmentTransaction.replace() but doesn't work with FragmentTransaction.add()

The new Shared Element Transitions works when i use Fragment 'replace' but i can't seem to make it work fragment 'add'. I use the same container in both the cases. More details: Activity - layout->
20
votes
1 answer

Return transition not working correctly when using fragment shared transitions

I have 2 fragments ListMovieFragment and DetailMovieFragment. I have an interface in ListMovieFragment that is implemented in the MainActivity. I am using shared element transition ; when I click the image view in ListMovieFragment the…
ant2009
  • 27,094
  • 154
  • 411
  • 609
20
votes
1 answer

Shared elements animating between fragments

I'm trying to animate 2 simple Views from a selected item in a RecyclerView to a new fragment. I've looked at a lot of examples of animating shared elements from one Activity to another Activity, but very few examples of animating a shared element…
17
votes
2 answers

How to postpone a Fragment's enter transition in Android Lollipop?

In Android Lollipop, the Activity#postponeEnterTransition() and Activity#startPostponedEnterTransition() methods give the Activity the ability to delay starting the entering and exiting shared element transitions until all data is loaded. These work…
9
votes
4 answers

Send data to fragment with FragmentTransaction

I'm in my fragment class calling this: @OnClick(R.id.blockedLinkLayout) public void onBlockedClick(){ final FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.replace(R.id.content, new SettingsBlockedUsersFragment(),…
y07k2
  • 1,898
  • 4
  • 20
  • 36
8
votes
0 answers

Shared Element Transition between two fragments, keeping first fragment visible

I got my shared element transition between two fragments working fine. However, the problem is I do not want to hide the first fragment - I want it to show underneath the newly added second fragment. If I do not include ft.hide( firstFragment ) in…
8
votes
0 answers

Fragment ReenterTransition not working. Need help clarifying the various Fragment transitions

I am implementing Fragment transition animations between items in a RecyclerView, and a Fragment showing details of the clicked item. In other words the relatively common... "Click on a Card in a list and it expands to a detailed view while the…
Sound Conception
  • 5,263
  • 5
  • 30
  • 47
6
votes
1 answer

Android 10 (Q) transition shared element view in Fragment with RecyclerView is being stucked at fixed position

I usually solve problems by myself but this time im really getting mad and can't find proper fix. Scenario: I have two fragments let's say A and B. In Fragment A I'm populating RecyclerView (later only RV) from Rest API. In Fragment B I have…
Simon Dorociak
  • 33,374
  • 10
  • 68
  • 106
6
votes
0 answers

TransitionPropagation working as intended?

Let's say we have two fragments: A and B A is visible, we want to replace it with B A has an exitTransition, B has an enterTransition Both transitions define a TransitionPropagation that they use to delay some animations. Those…
4
votes
0 answers

How to use popBackStackImmediate by allowing state loss commit

I have a call of popBackStackImmediate in my Activity. I want to make a call to this method, but allowing stateloss commit as it is doing this method: commitAllowingStateLoss. Is there a way for this?
X-HuMan
  • 1,488
  • 1
  • 17
  • 37
4
votes
0 answers

Lollipop transitions - Fragment to Activity

I am trying to figure out how to do Activity(or Fragment??) Transitions in Lollipop. I am using AppCompat v7 - v21. Here is my scenario: When an item in the GridView(inside Fragment) is clicked, I wish the image to make a transition as in the link…
3
votes
1 answer

How to show the fragment's enterTransition above the exitTransition

I want to show the enterTransition on top of the exitTransition. But as you can see in the gif, the enterTransition is below the exitTransition. How can I solve this problem? The navigation component is used for fragment…
dylan.kwon
  • 435
  • 5
  • 14
3
votes
1 answer

Make fragment transition animate views simultaneously

I am replacing a fragment A with a fragment B and animating this. Fragment B has a RelativeLayout with a TextView and a ListView. What I could see is that the views in fragment B are being animated separately, the TextView slides in with a different…
3
votes
1 answer

Fragment transitions in Android with MVVMCross

In MVVMCross is easy to develop Activity transitions, but i'm finding so many troubles trying to develop this with fragments. I got an application with a Hamburger Menu, and I wanna be capable to edit my own transitions between fragments. I've been…
1
2 3 4