android-transitions

How to specify TransitionManager.beginDelayedTransition to affect only direct child views

a 夏天 提交于 2019-12-22 13:15:11
问题 I am trying to use a ConstraintLayout in conjunction with views that slide up and down with animation. These views are organized vertically, with a RecyclerView at the top and two other views stacked under it: <constraint layout container> [ ] [ recycler view ] [ ] [48dp height 1st view] [48dp height 2nd view] </constraint layout container> The animation is very simple: When a button is tapped the 1st view moves from the bottom of the container to the position you can see above, when tapped

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

Parent activity becomes invisible on exit transition

做~自己de王妃 提交于 2019-12-21 05:17:25
问题 I'm using API Level 21, testing on a Nexus 6. I have two activities: master + detail, each view has a fragment. When I select an item in the master list it transitions to the detail view. I have enabled view transitions in both master and detail, like this: getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); Transition ts = new Slide(Gravity.RIGHT); ts.setDuration(2500); getWindow().setEnterTransition(ts); getWindow().setExitTransition(ts); getWindow()

How to implement a backstack when using the KitKat Transitions Framework

倖福魔咒の 提交于 2019-12-21 02:28:09
问题 I am using the new KitKat Transitions API on Android. I have created two Scene objects using two layouts. I animate from Scene 1 to Scene 2 inside a Fragment . I want to automatically move back to the previous Scene when the user presses the back button. Is there some kind of built-in backstack mechanism when using Transitions , or do I have to roll my own? It is easy enough to call TransitionManager.go(scene1) , but I really do not want to implement an onBackPressed() listener in all my

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

View Pager with previous and next item smaller in size with infinite scroll

家住魔仙堡 提交于 2019-12-18 09:15:09
问题 Want to create the view pager same as following UI, applied custom transformer but not working. ViewPager.java public class MyViewPager extends ViewPager implements ViewPager.PageTransformer { public static final String TAG = "MyViewPager"; private float MAX_SCALE = 0.0f; private int mPageMargin; private boolean animationEnabled=true; private boolean fadeEnabled=false; private float fadeFactor=0.5f; public MyViewPager(Context context) { this(context, null); } public MyViewPager(Context

Make activity animate from top to bottom

自古美人都是妖i 提交于 2019-12-17 17:29:17
问题 I am writing an Android app where I want the activity to appear by animating in from the bottom of the screen to the top. I am able to do this with code from here: How to translate the activity from top to bottom and viceversa? However, I am not able to do the vice-versa animation wherein the Activity would disappear by sliding from the top to the bottom of the screen. I used the code in the above link; the activity appears by sliding up, but when disappearing, it fades out, instead of

Shared Element Transition is not exiting properly

China☆狼群 提交于 2019-12-13 03:43:15
问题 I have fragment from which I'm launching activity with shared element transition that has viewpager in it, the enter transition works fine but when i scroll in view pager and finish transition the shared image comes from left side which is not desired it should reposition itself to where it was launched, here is my code: Intent myIntent = new Intent(getActivity(), EnlargeActivity.class); ActivityOptionsCompat options = ActivityOptionsCompat. makeSceneTransitionAnimation(getActivity(),

How to make slide animation with a fixed screen and new screen?

会有一股神秘感。 提交于 2019-12-13 03:42:49
问题 I made three xml files for the transition. enter_from_right.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0%" android:fromYDelta="0%" android:toXDelta="0%" android:toYDelta="0%" /> </set> none.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:duration="@android:integer