shared-element-transition

Glitch when animating nested views in a shared element Activity transition?

久未见 提交于 2020-01-10 10:17:05
问题 I've been messing around with the new APIs in Android 5.0 and have been trying to figure out whether or not it is possible to animate both a ViewGroup and one of its children separately as shared elements during an Activity transition. The screenshots below gives a simplified example of what I am trying to achieve: In the first activity, the dark gray box is a ViewGroup centered in the screen and the red box is its child View (the layout XML code I am using can be found here). When the user

ActivityOptionsCompat.makeSceneTransitionAnimation with custom duration

我与影子孤独终老i 提交于 2020-01-02 06:49:18
问题 I'm making a scene transition for devices with API level 20+. It is working fine, but I want to set custom duration to make the transition. Is it possible ?? My code: ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, viewStart, transitionName ); ActivityCompat.startActivity(this, detailsIntent, options.toBundle()); 回答1: You can set the desired duration in the new started activity, by adding: ChangeBounds bounds = new ChangeBounds(); bounds.setDuration

Weird issue when transitioning ImageView in Android 5.0

徘徊边缘 提交于 2020-01-01 04:45:15
问题 I'm experiencing a strange issue / bug regarding ImageView transitions between Activities in Android 5.0. I'm trying to transition a thumbnail image from Fragment A (in Activity A ) to the header image of Fragment B (in Activity B ). It works well most of the time, but it sometimes messes up ever so slightly. Here's a picture of what it looks like when it messes up: Naturally, it's supposed to fill the entire area. Both ImageViews are set to ScaleType.CENTER_CROP , so I can't imagine that

Shared element activity transition on android 5

折月煮酒 提交于 2019-12-31 08:30:10
问题 I wanted to setup a shared element transition when going from one Activity to another. The first Activity has a RecyclerView with items. When an item is clicked that item should animate to the new activity. So i've set a android:transitionName="item" on both the final activity views, as wel as the recycler-view item views. I'm also using this code when going to the next activity: this.startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this, itemView, "boomrang_item").toBundle(

How can i exclude ActionBar when transitions between Activities on Android 5.0

亡梦爱人 提交于 2019-12-28 15:37:31
问题 On Android 5.0 Lollipop, I have two activities A and B. Activity B has a slie enter transition from bottom with a Overlay ActionBar, but when B shows, the ActionBar also slide from bottom to top. How can i prevent the actionbar from slide transition. does system actionbar has an id that i can add to the exclude target ? thanks! 回答1: If you are using the AppCompat v7 library, it is easy: View decor = getWindow().getDecorView(); int actionBarId = R.id.action_bar_container; enterTransition

Z-Order in Shared Element Activity Transition Animations

家住魔仙堡 提交于 2019-12-23 08:36:35
问题 I am doing some basic shared element activity transition animations with code similar to this: Intent i = new Intent(AnActivity.this, AnotherActivity.class); ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, Pair.create(vBackground, "background"), Pair.create(vImage, "image"), Pair.create(vName, "name"), Pair.create(vDistance, "distance") ); startActivity(i, options.toBundle()); Can I change the Z-order that the animation assigns to the views? The reason

Show a fragment with shared elements animation

纵然是瞬间 提交于 2019-12-22 10:07:56
问题 In my app I have code like this: final FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.fragment_container, fragment, "tag"); transaction.addSharedElement(view, "transitionName"); transaction.addToBackStack(null) .commit(); It works fine, shared elements animation works. But if I change this code like getSupportFragmentManager().beginTransaction() .add(R.id.fragment_container, fragment, "tag") .hide(fragment) .commit(); final

Content Transitions on Top of Shared Elements in android

可紊 提交于 2019-12-22 08:59:32
问题 I am trying my hands with SharedElements and Content Transitions in Android. I was trying to combine Content Transitions and Shared Elements and create a particular animation, however I have encountered a problem. After the transition on Shared Elements (ImageView) end, I am using content Transitions to animate Text View into position using Slide Transition. However when the textViews are sliding from Bottom to their position on the top of image View, the text goes beneath the ImageView

Android lollipop shared elements transition blink / flash

不想你离开。 提交于 2019-12-18 12:49:21
问题 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