android-transitions

Switch fragments in view pager with flip animation

混江龙づ霸主 提交于 2019-12-12 04:37:33
问题 I've been trying to switch fragments inside a fragmentStatePagerAdapter, but even though I was able to change from fragment C-D in the same position; I have not been able to animate the transition. I would appreciate any suggestions to achieve this effect: A - B - C | -> Flip transition back and forth D ABC or ABD have the normal animation transition, but when in C if I click a button I need to swap the fragment D with a flip animation and if I'm looking at D flip back to C. 回答1: The training

Activity transition ignoring Toolbar

ε祈祈猫儿з 提交于 2019-12-12 03:04:43
问题 let's see if someone can help me with this. In my app I have successfully implemented slide transitions between most of my activities. All my activities layouts consist in a regular toolbar and some content below. So what I would like is the animations to ignore the toolbar and only affect the main content. Ideally, the toolbar would remain in its place and the main content of the layout would be the one sliding. For completion of the question, here is one of my transition xmls: <?xml version

Android shared element transition exit for fragment?

久未见 提交于 2019-12-12 00:30:24
问题 I am trying to do this kind of animation but with fragments https://i.imgur.com/rUkkfUZ.gif I have a fragment A and Fragment B Fragment A contains a recycler view of pictures. When a picture is pressed, it will go to fragment B. Fragment B will have the same image but on top of the screen. I want a transition that moves the selected image to the top to make it seamless. At the moment it works when going back i.e. from fragment B to fragment A however, it does not work from A to B. Here is my

Performing a transition from item in RecyclerView of Fragment to another Fragment

孤者浪人 提交于 2019-12-11 14:40:15
问题 I am trying to perform an explode transition when a user clicks on an item in a RecyclerView of a fragment that will replace the current fragment with another full-screen fragment. I have seen that the best way to implement this is through sharedElements, however, the only view that is shared between the item in the RecyclerView and the full-screen fragment is a TextView. When trying the explode transition (by using android.R.transition.explode) to expand the item up and down to make the full

Fragment to fragment shared element transition is not working when exit

情到浓时终转凉″ 提交于 2019-12-11 10:16:34
问题 I suspect that its happening because of transition name is not set but im unable to detect that is it the reason or there is another reason or what I'm doing wrong or what is missing, here is my code: on click of recyclerview item: i didn't set transition name in on bind view if i do it also don't work holder.iv.setTransitionName(MainActivity.position + "ZoomImage"); MainActivity.position = position; ImagePagerFragment productDetailFragment = new ImagePagerFragment(); productDetailFragment

Two levels of activities on Android. Seamless transition

匆匆过客 提交于 2019-12-11 09:17:31
问题 The app has 3 activities: A, B and C. "B" has style=Theme.Dialog, so it can be displayed in a fraction of the screen on top of "A" and "C". The idea is to show "B" on top while "A" is getting replaced with "C", so the transition between "A" and "C" will appear seamless for user. Questions : is this the right approach (or I should use PopupWindow, etc. instead of activity "B")? when activity "C" is launched, "B" is hidden and shown again (onPause/onResume called again) which is looking like "B

Intent not working for Parcelable Objects in onActivityReenter with SharedElement Transitions

时光总嘲笑我的痴心妄想 提交于 2019-12-11 03:16:43
问题 I am working on Shared elements Transitions in Android and have executed the animations perfectly. The problem I am facing is when passing data using Intents. So, I basically start Intent from ActivityA, which is the first screen containing a recycler view, do an ImageTransform using TransitionName and start ActivityB, which contains a details activity containing a ViewPager. Now, when I press back button, ActivityB calls finishAfterTransition in which I create an Intent and set the result as

TransitionListener callbacks not called when there is nothing to change

瘦欲@ 提交于 2019-12-10 22:19:03
问题 I'm animating between scenes using the TransitionManager and constraint sets using the following code. val transition = AutoTransition() transition.addListener(object : Transition.TransitionListener { override fun onTransitionEnd(transition: Transition) { // do something } }) val constraintSet = ConstraintSet() constraintSet.clone(this, R.layout.frame_loading) TransitionManager.beginDelayedTransition(rootLayout, transition) constraintSet.applyTo(rootLayout) There's something I want to do when

Lollipop transitions not working when resuming activity

别等时光非礼了梦想. 提交于 2019-12-10 18:49:31
问题 I have been trying to implement the new Lollipop activity and shared elements transitions during a few days following the steps from Alex Lockwood awesome blog posts. But now I'm facing a bit of a problem. My application uses a DrawerLayout for navigation, but I can also launch some of the activities when clicking other views and buttons. I have set correctly all the Enter, Reenter, Return and Exit transitions for all the activities as well as calling: startActivity(intent, ActivityOptions

android lollipop - setentertransition() for fragment not working properly on exiting

女生的网名这么多〃 提交于 2019-12-10 15:12:17
问题 While replacing fragment, I am using Slide animation available for android lollipop version. It works as expected for this particular replacement, but on pressing back button it first pops back current fragment & then reverse of enter animation (slide out) is executed. private void replaceContentFrameByFragment(Fragment replaceBy, String replaceByFragmentTag) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Slide slide = new Slide(Gravity.BOTTOM); slide.setDuration(1000);