android-transitions

Shared Element Transition + Fragment + RecyclerView + ViewPager

☆樱花仙子☆ 提交于 2019-12-02 01:56:27
I am implementing a gallery app, which has a Fragment that holds a RecyclerView with images, onClick of an image I go to ViewPager to cycle through images. For now, I am trying to implement just the entry animation like in this video. The problem is the animation just doesn't work, I am obviously missing something (just showing code which is relevant to transitions): ViewPager: public class ViewPagerFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment

Why Fade transition doesn't work on Shared Element

落爺英雄遲暮 提交于 2019-12-01 09:17:00
I have 2 Activities , the Shared Element transition works fine. ChangeBounds is the only the transition applied. I want to apply a fade transition while the shared element moves, so the ordering is ORDERING_TOGETHER. public class TransitionUtils { public static Transition makeSharedElementEnterTransition(final Context context, final long duration) { TransitionSet set = new TransitionSet(); set.setOrdering(TransitionSet.ORDERING_TOGETHER); set.setDuration(duration); Transition changeBounds = new ChangeBounds(); changeBounds.addTarget(context.getString(R.string.transition_name_search_text)); set

Why Fade transition doesn't work on Shared Element

江枫思渺然 提交于 2019-12-01 05:38:51
问题 I have 2 Activities , the Shared Element transition works fine. ChangeBounds is the only the transition applied. I want to apply a fade transition while the shared element moves, so the ordering is ORDERING_TOGETHER. public class TransitionUtils { public static Transition makeSharedElementEnterTransition(final Context context, final long duration) { TransitionSet set = new TransitionSet(); set.setOrdering(TransitionSet.ORDERING_TOGETHER); set.setDuration(duration); Transition changeBounds =

Why does my Android transition ignore the TransitionListener?

一世执手 提交于 2019-12-01 00:01:53
I'm trying to make a smoothly-updating display by calling TransitionManager.beginDelayedTransition(viewGroup, new AutoTransition()) before updating the display. But I found that sometimes I update the display rapidly and Android gets confused. So I added a TransitionListener to the AutoTransition where transitionEnd() calls back, saying the transition is complete, at which point I animate to the new state of the screen. But I find that usually this is not even called. Is there some way of having a callback called back either when a) a transition ends or b) a transition never gets called in the

Why does my Android transition ignore the TransitionListener?

前提是你 提交于 2019-11-30 18:14:30
问题 I'm trying to make a smoothly-updating display by calling TransitionManager.beginDelayedTransition(viewGroup, new AutoTransition()) before updating the display. But I found that sometimes I update the display rapidly and Android gets confused. So I added a TransitionListener to the AutoTransition where transitionEnd() calls back, saying the transition is complete, at which point I animate to the new state of the screen. But I find that usually this is not even called. Is there some way of

Android lollipop shared elements transition blink / flash

∥☆過路亽.° 提交于 2019-11-30 08:22:46
I see strange thing in my shared element transition on Lollipop. Shared elements are flickering just before they are starting to animate (please see video https://www.youtube.com/watch?v=DCoyyC_S-9A ) I've no idea why it is happening. However when I add <item name="android:windowSharedElementsUseOverlay">false</item> to my theme I don't see flickering but the transition is not looking good (they look like only half of it is animating second half of animation 'hidden'). Other transition settings: <item name="android:windowActivityTransitions">true</item> <item name="android

Shared Element Transition on CardView with radius

隐身守侯 提交于 2019-11-30 03:59:55
I've been working on this problem for weeks and I'm still unable to solve this problem. So, I have a CardView that contains a LinearLayout with an ImageView. Without that radius Shared Element Transition works seamlessly. However, when I add radius (app:cardCornerRadius="25dp") to that CardView, the Shared Element Transition looks ugly because it remove the radius first and then start the animation . 1st Approach: ObjectAnimator I create ObjectAnimator to animate the radius value on card, and after the animation end it start the transition. ObjectAnimator animator = ObjectAnimator .ofFloat

Shared Element Transition on CardView with radius

你离开我真会死。 提交于 2019-11-28 23:12:23
问题 I've been working on this problem for weeks and I'm still unable to solve this problem. So, I have a CardView that contains a LinearLayout with an ImageView. Without that radius Shared Element Transition works seamlessly. However, when I add radius (app:cardCornerRadius="25dp") to that CardView, the Shared Element Transition looks ugly because it remove the radius first and then start the animation . 1st Approach: ObjectAnimator I create ObjectAnimator to animate the radius value on card, and

How to give top to bottom animation in Android?

Deadly 提交于 2019-11-28 21:24:18
I am able to give bottom to top animation when I go to next activity but now when I pressed back I am using same code for giving animation from top to bottom animation but it always goes to bottom to top so my question is how to give animation from top to bottom when i pressed back button on android device? Please find my code below. I use it during transitioning from one Activity to another using an Intent . overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up ); and xml is: slide_in_up.xml <?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android

Shared element transition : activity into fragment nested in another activity

别来无恙 提交于 2019-11-28 17:04:01
i am trying to add shared element transition into my app. Scenario is that user clicks on image thumbnail which than opens another activity with full screen image view. This works fine if shared view is hosted directly within layout of target activity. Works smoothy for enter/exit animation. But when i'am trying to achieve similar effect within fragment which is nested in target activity this approach doesn't work . Funny thing is that enter animation is not showed, but exit animation is working fine . Another even more complicated view hierarchy is that if target view (ImageView) is hosted