Giter Club home page Giter Club logo

transitions-everywhere's People

Contributors

andkulikov avatar avinash-bhat avatar evant avatar kirillmakarov avatar lukaville avatar pardom avatar ravidsrk avatar raycoarana avatar ufreedom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

transitions-everywhere's Issues

Crashes on 4.4.4 and 4.4.2

I am seeing crash reports from a LGE Nexus 5 (4.4.4), HTC One_M8 (4.4.4), Motorola XT1092 (4.4.4), and LGE LG-D855 (4.4.2) with the following trace:

at com.transitionseverywhere.utils.FloatProperty.<init>(FloatProperty.java:15)
at com.transitionseverywhere.utils.ViewUtilsKitKat$1.<init>(ViewUtilsKitKat.java:17)
at com.transitionseverywhere.utils.ViewUtilsKitKat.<clinit>(ViewUtilsKitKat.java:17)
at com.transitionseverywhere.utils.ViewUtils.<clinit>(ViewUtils.java:177)
at com.transitionseverywhere.TransitionManager.beginDelayedTransition(TransitionManager.java:439)

Is this a known issue?

Different Results between android.transitions and TransitionsEverywhere

Hi, I've been playing around with the KitKat (and above) version of the android transition framework, mainly exploring its features. I'm still relatively new when it comes to all the bells and whistles of what it can and can't do.

After creating a sample app with KitKat's framework, i decided to change import Transitions-Everywhere and simply replace the imports to compare. Let me say that the library is impressive, good work :)

Long story short, there are a few noticeable differences and I'm wondering what am I doing wrong.

First, I've created a sample project which allows you to see the same code running on either framework (the code is literally a copy/paste with the imports/names changed to reflect which one is which).

It's available here: https://github.com/Gryzor/TransitionsEverywhereComparison

(Please run it on KitKat and above, I didn't add checks for the Android counterpart which obviously only works on KitKat and above).

Noticeably, if you look at android_transition_set.xml (and its almost identical transition_everywhere_set.xml counterpart), you will notice that it tries to play together to different targets:

changeBounds
ChangeColor(custom transition taken from Google's samples, each version uses the corresponding framework)
fadeIn
slide

There are two scenes: scene_1 and scene_2. They are not too fancy, just a few widgets that have a couple different properties.

Tapping Go "button" will alternate between both scenes. The "Backwards" transition is just an AutoTransition (I'm only really interested in going forwards)

The code for each activity is almost identical, except for the fact that they inflate the corresponding TransitionManager from XML, which, in turn, points to the corresponding TransitionSet.

PROBLEMS IN Transitions Everywhere

(note, I only point problems when going from scene 1 to scene 2, the reverse is just a standard AutoTransition that I only added to make it easier to observe the first transition multiple times).

  1. The Line Of Text Above (red), doesn't fade in at the same time, it's as if it appears after the animations are done (?)
  2. The Custom Color transition is not executed in neither view (Go button and "This is a line of Text" (yellow/purple).
  3. The lines of text below fade out then fade in, when they shouldn't because they should only be targeted by the change bounds. All other Transitions have different/specific targets.
  4. The Slide In (I JUST SHOWED UP!) doesn't happen (it fades in together with the others).
  5. The Go Text bug is unrelated to either framework as it seems to be a limitation mentioned here: https://developer.android.com/training/transitions/overview.html#Limitations (and I have no idea how to overcome that yet).

What am I missing? :)

p.s.: one guess is that the xml definitions for transitionseverywhere must be changed so instead of <Fade> I may have to use a different name, but I'm not sure.

Recolor causes crash on pre Lollipop

Tested the sample app on 4.1.1 and pressing the "TAP ON ME" button in the "Recolor transition" sample causes a StackOverflowError:

com.andkulikov.transitionseverywhere E/AndroidRuntime: FATAL EXCEPTION: main
  java.lang.StackOverflowError
      at java.lang.Integer.<init>(Integer.java:88)
      at java.lang.Integer.valueOf(Integer.java:707)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      ...

On Android 5.0.0 the same sample works as expected.

Replacing COLORDRAWABLE_COLOR with "color" at Recolor.java#L124 fixes the issue:

    return ObjectAnimator.ofObject(endColor, "color",
            new ArgbEvaluator(), startColor.getColor(), finalColor);

Can't use Transitions-Everywhere error with R.styleable

Hello,
Thank you for your library, but I have a problem when try to test it.
First, I just start to use Android studio (I'm android beginner) and want to try you transition library.
Then i got this error.

  1. In your transitionseverywhere/extra/Scale they can't find R.styleable
  2. In your example AutoTransitionSample they can't find R.layout.fragment_autotransition (i already copy layout file to res/layout folder)

May you guide me to solve this issue.
Thank you very much.

Cannot apply interpolator

I cannot apply interpolator in the xml, as well as in the code.

I tried using the following code:

    <transitionSet
        app:interpolator="@android:interpolator/decelerate_quad"
        >

But that does not seem to have effect.

Provide sample APK

Could you please provide an APK to test this library in case who is lazy :)

[Question] Transition between several layouts

Hello, u don't have example of such behaviour - I want to move clone of some deeply layouted image outside the screen, how can I do that? Now all transitions take place inside parent layout only
Thanks in advance

Error while fading an toggle button's container whith a many elements

I have an error while doing this process:
JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethod called with pending exception java.lang.IllegalStateException: Unable to create layer for LinearLayout at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2) at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:323) at void android.os.Looper.loop() (Looper.java:135) at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5417) at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:726) at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:616)
and more and more... errors. Sorry for bad editing of code.
This error appears , while i try to animate appearing of toggle button's container with more then 100 elements. With low count of elements all works fine.
Thanks for help

Why JellyBeanMR2ViewGroupUtils use sceneRoot.getOverlay()?

In ViewOverlayPreJeelybean, we find frame layout with id 'android.R.id.content' and then add the same size framelayout to add overlayView, when use Visibility Transition, the overlayView animation can be drawn out of the sceneRoot's bounds. But in JellyBeanMR2ViewGroupUtils we use sceneRoot.getOverlay(), the overlay bound is the same as sceneRoot's , thus Visibility Transition can not be drawn out of the sceneRoot's bound. I have to download the source code and change sceneRoot.getOverlay() to the top parent framelayout's overlay to achieve my PM's requirement.
Any ideas ? Thanks.

No animations seen even for example code

I followed the article, first added dependency in gradle, Than added following in fragment:

ViewGroup transitionContainer = (ViewGroup) rootView.findViewById(R.id.temp_container);
Button tempButton = (Button) transitionContainer.findViewById(R.id.temp_button);
final TextView tempView = (TextView) transitionContainer.findViewById(R.id.temp_text);
TransitionManager.beginDelayedTransition(transitionContainer);

Layout file has a android.support.design.widget.CoordinatorLayout parent, in which along with other LinearLayouts I added a LinearLayout to test transition.

tempView.setVisibility((toggle)? View.VISIBLE : View.GONE);
above line is working perfectly and the textview is coming and going out of view as expected.

Thing is, there is no animation at all. I tried specifying custom transition too, to no avail.

I am lost, it just wont work, and after searching around, it seems like I am the only one this library hates.
Looking forward to hear about silly mistakes I did, thanks in advance.

P.S.
Other uninteresting stuff:
Android Studio 2.2.2
buildToolsVersion 23.0.2
compileSdkVersion 24
minSdkVersion 16
library version 1.7.0
Testing device: Xperia Z4 (Android 6.0.1)

problem with getWindow().setExitTransition

hi.
method getWindow().setExitTransition just get android.transition.Explode as a parameter.
but i want to use this kind of transition in android api below 21.
how can i do that?

Missing license

I have seen that the java files are licensed under the apache 2 license (as specified in the headers), but there is not an explicit LICENSE file for the whole library. Could you please include it together with a copyright line so we can properly credit it?

Alpha values not being respected in scenes

Hello thanks for this backport! I have however found an issue where it isn't not playing nicely with another widget library.

I have a sample project here demonstrating the issue. If you compile and run the project and click the add payment method button the Transition will kick in displaying a new scene. If android:ids are shared between scenes then it looks as if the alpha values are not honored. Switching the Transition package names back to the framework will resolve the issue.

Here is the sample project
https://drive.google.com/file/d/0B9BQRk_YVoNrdDVqVVduY3dnY0k/view?usp=sharing

And here is a link to the issue originally opened on the widget library.
IanGClifton/AndroidFloatLabel#20

CardView shadow is lost during transition (on Lollipop and newer)

When a CardView is involved in a Slide transition, it will loose it's shadow. This doesn't seem to effect pre-Lollipop (tested on 4.1.1 and 4.3 and CardView kept it's shadow) but on 5.0+ (tested on 5.0 and 6.0) it looses it's shadow.

Forked and branched to help demonstrate the issue:
https://github.com/twyatt/Transitions-Everywhere/tree/demo-cardview-loosing-shadow

Run sample app -> Scene to scene transitions -> Scene 3 -> Scene 2

On pre-Lollipop you'll see the transition as expected, but on Lollipop and newer you'll see the CardView (that holds the TextView) will loose it's shadow during the transition.

...and while I'm here: thanks for this great library! ๐Ÿ˜„

on Adapter donot use

public class UFComplexMatchControlAdapter extends RecyclerArrayAdapter {

public UFComplexMatchControlAdapter(Context context) {
    super(context);
}


@Override
public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
    return new ViewHolder(parent, 0);
}


class ViewHolder extends BaseViewHolder<UFControlConfig> {


    @Bind(R.id.fragment_complexmatch_bottom_control_name)
    TextView mFragmentComplexmatchBottomControlName;
    @Bind(R.id.transitions_container)
    AutoRelativeLayout mTransitionsContainer;

    public ViewHolder(ViewGroup parent, @LayoutRes int res) {
        super(parent, R.layout.fragment_complexmatch_bottom_control_item);
        //ๅˆๅง‹ๅŒ–ButterKnife
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(UFControlConfig data) {
        super.setData(data);
        TransitionManager.beginDelayedTransition(mTransitionsContainer, new Recolor());
        mFragmentComplexmatchBottomControlName.setTextColor(getContext().getResources().getColor(data.isSelected() ? R.color.white : R.color.black_text));
        mFragmentComplexmatchBottomControlName.setBackgroundDrawable(
                new ColorDrawable(getContext().getResources().getColor(data.isSelected() ? R.color.black_text :
                        R.color.white)));

// mFragmentComplexmatchBottomControlName.setBackgroundColor(getContext().getResources().getColor(data.isSelected() ? R.color.black_text : R.color.white));
// mFragmentComplexmatchBottomControlName.setBackgroundResource(data.isSelected() ? R.drawable.stroke_button_selected : R.drawable.stroke_button);
mFragmentComplexmatchBottomControlName.setText(data.getName());
}
}

}

"ChangeTransform" on KITKAT

The following code works fine on Marshmallow (see this video https://youtu.be/1pZTlkjiHRg ), but gives strange animation on KITKAT ( https://youtu.be/m8bGYOA-Znw ) Any reason for this ?

    ChangeBounds changeBounds = new ChangeBounds();
    ChangeTransform changeTransform = new ChangeTransform();
    Fade fadeOut = new Fade(Fade.OUT);

    transition1 = new TransitionSet();
    transition1.setOrdering(TransitionSet.ORDERING_TOGETHER);
    transition1.addTransition(changeTransform) // "changeTransform" is not working on KITKAT 
                 .addTransition(changeBounds)
                 .addTransition(fadeOut);
    transition1.setDuration(300);

Customizing changeBounds animation in xml ignores attributes(?)

I have the following transition specified in xml:

<?xml version="1.0" encoding="utf-8"?>
<changeBounds xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="4000"/>

When I use this in the following manner:

Scene temp = current;
current = other;
other = temp;
Transition myTransition = TransitionInflater.from(this).inflateTransition(R.anim.move);
TransitionManager.go(current, myTransition);

The transition partially works, though the duration isn't taken into account at all. Adding an interpolator also does nothing. In the logs I see the following:

11-11 19:50:15.184    4983-4983/com.example.gregloesch.playground I/dalvikvm๏น• Could not find method android.animation.PropertyValuesHolder.ofObject, referenced from method android.transitions.everywhere.ChangeBounds.createAnimator
11-11 19:50:15.184    4983-4983/com.example.gregloesch.playground W/dalvikvm๏น• VFY: unable to resolve static method 40: Landroid/animation/PropertyValuesHolder;.ofObject (Landroid/util/Property;Landroid/animation/TypeConverter;Landroid/graphics/Path;)Landroid/animation/PropertyValuesHolder;
11-11 19:50:15.184    4983-4983/com.example.gregloesch.playground D/dalvikvm๏น• VFY: replacing opcode 0x71 at 0x0314
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground I/dalvikvm๏น• Could not find method android.animation.ObjectAnimator.ofFloat, referenced from method android.transitions.everywhere.utils.AnimatorUtils.ofFloat
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground W/dalvikvm๏น• VFY: unable to resolve static method 28: Landroid/animation/ObjectAnimator;.ofFloat (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground D/dalvikvm๏น• VFY: replacing opcode 0x71 at 0x001b
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground I/dalvikvm๏น• Could not find method android.animation.ObjectAnimator.ofInt, referenced from method android.transitions.everywhere.utils.AnimatorUtils.ofInt
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground W/dalvikvm๏น• VFY: unable to resolve static method 30: Landroid/animation/ObjectAnimator;.ofInt (Ljava/lang/Object;Landroid/util/Property;Landroid/util/Property;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground D/dalvikvm๏น• VFY: replacing opcode 0x71 at 0x001a
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground I/dalvikvm๏น• Could not find method android.animation.ObjectAnimator.ofInt, referenced from method android.transitions.everywhere.utils.AnimatorUtils.ofInt
11-11 19:50:15.192    4983-4983/com.example.gregloesch.playground W/dalvikvm๏น• VFY: unable to resolve static method 32: Landroid/animation/ObjectAnimator;.ofInt (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;

View doesn't hide to proper position - 4.2.2

I'm seeing issues with views on being positioned correctly on a 4.2.2 emulator (Genymotion). This works fine in a 4.4 emulator (Genymotion).

263xaetqem

public class MyActivity extends Activity {
    private Holdr_ActivityMy holdr;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
        holdr = new Holdr_ActivityMy(findViewById(android.R.id.content));
    }

    public void button2Click(View view) {
        TransitionManager.beginDelayedTransition(holdr.content);
        if (holdr.reviews.getVisibility() == View.VISIBLE) {
            holdr.reviews.setVisibility(View.GONE);
        } else {
            holdr.reviews.setVisibility(View.VISIBLE);
        }
    }

}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".MyActivity"
    android:orientation="vertical"
    android:gravity="center_horizontal"
    >

    <Button
        android:text="Testing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="button1Click"
        />

    <TextView
        android:id="@+id/reviews"
        android:text="Testing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        />

    <TextView
        android:id="@+id/test1"
        android:text="Testing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/test2"
        android:text="Test 2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <Button
        android:id="@+id/button2"
        android:text="Testing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="button2Click"
        />

</LinearLayout>

Transition on dialog box?

Just wanted to know if these transitions can be applied to dialog box?
So for e.g. when the user clicks on the button, the dialog box should slowly increase in size from the point of touch.

Fragment transitions?

Hello,

First of all, this is an excellent library and works quite well for scene transitions.

I'm trying to apply it to fragments as enter transitions and I'm not able to use Explode() or ChangeBounds (or any transition) because of the following exception:

Any ideas please? If it doesn't support fragment transitions, do you plan on supporting it someday?

java.lang.ClassCastException: android.transitions.everywhere.ChangeBounds cannot be cast to android.transition.Transition
at android.support.v4.app.FragmentTransitionCompat21.cloneTransition(FragmentTransitionCompat21.java:41)
at android.support.v4.app.BackStackRecord.getEnterTransition(BackStackRecord.java:1056)
at android.support.v4.app.BackStackRecord.configureTransitions(BackStackRecord.java:1138)
at android.support.v4.app.BackStackRecord.beginTransition(BackStackRecord.java:1038)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:660)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

Transition for new ListView Items

I am trying to add a transition for every ListView item that gets added. My idea is to incorporate the transition code before I call notifyDataSetChanged(). Here is my code:

 mUpdateComments = new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            mNumberOfCommentsAtPoll = (int) dataSnapshot.getChildrenCount();
            for (DataSnapshot x : dataSnapshot.child(COMMENTS_LABEL).getChildren()) {
                Log.v("DATA_SNAPSHOT", x.toString());
                if (mCommentIDArrayList.contains(x.getKey())){
                    Log.v("Comment_Already_Added", x.getKey());
                } else {
                    Log.v("Child_Added_Called", "Child Added Called");
                    mCommentIDArrayList.add(x.getKey());
                    String commentID = (String) dataSnapshot.child(COMMENTS_LABEL).child(x.getKey()).child("COMMENT").getValue();
                    Log.v("New_Comment", "The new comment is " + commentID);
                    String userID = (String) dataSnapshot.child(COMMENTS_LABEL).child(x.getKey()).child("USER_ID").getValue();
                    Log.v("New_User_ID", "The new userID is " + userID);
                    mCommentArrayList.add(new Comments(mUserAvatar, userID, commentID));
                    Collections.reverse(mCommentArrayList);
                    mCommentAdapter.notifyDataSetChanged();
                }
            }
        }

        @Override
        public void onCancelled(FirebaseError firebaseError) {

        }
    };

TransitionSet setStartDelay not work

Code:
TransitionSet set = new TransitionSet().
addTransition(new Fade(Fade.OUT)).
addTransition(new ChangeBounds()).
addTransition(new Fade(Fade.IN))
.setStartDelay(2000);
TransitionManager.beginDelayedTransition((ViewGroup) myView.getParent(), set);
myView.setVisibility(View.GONE );

myView also hide immediately

[BUG] android 4.1.2

This bug occurs in android 4.1.2 only(haven't checked for lower versions). Works fine with 4.3 and above. I provide as root view (ViewGroup) getActivity().getWindow().getDecorView().getRootView()
. Seems that the casting is the reason of crashing

 java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.View            at android.transitions.everywhere.utils.ViewOverlayPreJellybean.getOverlay(ViewOverlayPreJellybean.java:123)    at android.transitions.everywhere.utils.ViewGroupOverlayUtils$BaseViewGroupOverlayUtilsImpl.initializeOverlay(ViewGroupOverlayUtils.java:53)       at android.transitions.everywhere.utils.ViewGroupOverlayUtils.initializeOverlay(ViewGroupOverlayUtils.java:156)            at android.transitions.everywhere.TransitionManager.sceneChangeRunTransition(TransitionManager.java:223)            at 
android.transitions.everywhere.TransitionManager.beginDelayedTransition(TransitionManager.java:379)
            at    android.transitions.everywhere.TransitionManager.beginDelayedTransition(TransitionManager.java:340)
            at com.example.project.views.TutorialTip.animateChanges(TutorialTip.java:97)
            at com.example.project.views.TutorialTip.showOverlay(TutorialTip.java:81)
            at com.example.project.views.TutorialTip.show(TutorialTip.java:130)
            at com.example.project.tooltips.ProfileTooltipsHelper.showTooltip(ProfileTooltipsHelper.java:151)
            at com.example.project.tooltips.ProfileTooltipsHelper.showNext(ProfileTooltipsHelper.java:130)
            at com.example.project.screens.profile.FragmentProfileMe.showTips(FragmentProfileMe.java:97)
            at     com.example.project.screens.profile.FragmentProfileMe_.access$501(FragmentProfileMe_.java:26)
            at com.example.project.screens.profile.FragmentProfileMe_$2.run(FragmentProfileMe_.java:140)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)

change namespace

I don't think it's a good idea to use the support namespace as it's confusing and makes it look like it's part of the official support library.

Transition animation dosen't seem to work on Pre-Lollipop

From this sample app I tried to implement fragment transition with shared elements. Here is a snippet from the sample :

`
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.transition.ChangeBounds;
import android.transition.ChangeImageTransform;
import android.transition.ChangeTransform;
import android.transition.TransitionSet;
import android.util.AttributeSet;

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public class DetailsTransition extends TransitionSet {
public DetailsTransition() {
init();
}

/**
 * This constructor allows us to use this transition in XML
 */
public DetailsTransition(Context context, AttributeSet attrs) {
    super(context, attrs);
    init();
}

private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).
            addTransition(new ChangeTransform()).
            addTransition(new ChangeImageTransform());
}

}
`

This is my version using your library (for pre-Lollipop):
`
import com.transitionseverywhere.ChangeBounds;
import com.transitionseverywhere.ChangeImageTransform;
import com.transitionseverywhere.ChangeTransform;
import com.transitionseverywhere.TransitionSet;

public class DetailsBackPortTransition extends TransitionSet
{

public DetailsBackPortTransition(){
    init();
}

private void init()
{
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds())
            .addTransition(new ChangeTransform())
            .addTransition(new ChangeImageTransform());
}

}`

Here is the fragment class (assume there's an adapter, a listener interface, and a Details fragment. A click from an item in the list opens up the DetailsFragment in an animated fashion. Like I said, I tested your library for animation on pre-Lollipop (I tested it on a samsung having KitKat) but it doesn't seem to work. It opens without any animation:

`public class GridFragment extends Fragment implements KittenClickListener {

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    return inflater.inflate(R.layout.fragment_grid, container, false);
}

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recyclerview);
    recyclerView.setAdapter(new KittenGridAdapter(6, this));
    recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));
}

@Override
public void onKittenClicked(KittenViewHolder holder, int position) {
    int kittenNumber = (position % 6) + 1;

    DetailsFragment kittenDetails = DetailsFragment.newInstance(kittenNumber);

    // Note that we need the API version check here because the actual transition classes (e.g. Fade)
    // are not in the support library and are only available in API 21+. The methods we are calling on the Fragment
    // ARE available in the support library (though they don't do anything on API < 21)

    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
        kittenDetails.setSharedElementEnterTransition(new DetailsBackPortTransition());
        kittenDetails.setEnterTransition(new com.transitionseverywhere.Fade());
        setExitTransition(new com.transitionseverywhere.Fade());
        kittenDetails.setSharedElementReturnTransition(new DetailsBackPortTransition());
    }
    else         
    {
        kittenDetails.setSharedElementEnterTransition(new DetailsTransition());
        kittenDetails.setEnterTransition(new Fade());
        setExitTransition(new Fade());
        kittenDetails.setSharedElementReturnTransition(new DetailsTransition());
    }

    getActivity().getSupportFragmentManager()
            .beginTransaction()
            .addSharedElement(holder.image, "kittenImage")
            .replace(R.id.container, kittenDetails)
            .addToBackStack(null)
            .commit();
}

}
`

Crash on Android 4.1 with transitions inside toolbar

TransitionManager.beginDelayedTransition(getToolbar());

If i'll call this code before expandActionView in any item in toolbar all toolbar content will be messed up.

If toolbar has animateLayoutStateChanges flag equals true any toolbar interaction would cause a crash in this situation.

Can I edit transition animation..?

I know I should report some error kinda thing, but you're work is too awesome to make some issues for me.

I really appreciate for your work.

My question is, can I change animation settings like alpha value..?
I'm using very basic one "automatic-" and I don't want that alpha setting...

Thanks in advance ::D

Slide Transition - jump before transition

I have 3 views on the first scene and only one of them on the second scene.

I am using Slide transition to slide out the 2 views out of the screen. These 2 views are placed in Relative layout and positioned using "above" and "below" attributes.

Scene 1

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <TextView
        android:id="@+id/caption"
        style="@style/RegistrationTextView"
        android:text="@string/let_us_get_you_started"
        />

    <LinearLayout
        android:id="@+id/edit_text_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/caption"
        android:layout_above="@+id/next"
        android:orientation="vertical"
        android:weightSum="2"
        android:animateLayoutChanges="true"
        >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center|bottom"
            android:animateLayoutChanges="true"
            >

            <EditText
                android:id="@+id/edit_text"
                style="@style/RegistrationEditText"
                android:imeOptions="actionNext"
                android:hint="@string/email_address"
                />

            <EditText
                android:id="@+id/edit_text_surname"
                style="@style/RegistrationEditText"
                android:layout_marginLeft="10dp"
                android:hint="@string/surname"
                android:inputType="textNoSuggestions|textCapWords"
                android:imeOptions="actionNext"
                android:visibility="gone"
                />
        </LinearLayout>

        <TextView
            android:id="@+id/validation_message"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:textColor="@color/validation_message"
            android:visibility="invisible"
            />
    </LinearLayout>

    <Button
        android:id="@+id/next"
        style="@style/RegistrationButton"
        android:text="@string/next"
        />

    <ProgressBar
        android:id="@+id/progress_bar"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="20dp"
        android:visibility="gone"
        />

</RelativeLayout>

Scene 2

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <Button
        android:id="@+id/next"
        style="@style/RegistrationButton"
        android:text="@string/next"
        />

</RelativeLayout>

Transition

<transitionSet
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:transitionOrdering="sequential"

    >

    <slide app:slideEdge="left" app:duration="1000">
        <targets>
            <target app:targetId="@id/edit_text_container" />
        </targets>
    </slide>

    <transitionSet
        app:duration="3000"
        >

        <targets>
            <target app:targetId="@id/caption" />
        </targets>

        <slide app:slideEdge="left" />
        <fade app:fadingMode="fade_out" />

    </transitionSet>

</transitionSet>

Issue

The "edit_text_container" jumps up before the transition starts. I have tested it on JB, KK, LP. It works without jump only on JB. Maybe it was because of the small screen size, I am not sure.

DataBinding compatibility

Hi,

I can't use it in activities in which I use DataBinding. Do you know anything related to this issue? I tried using different ViewGroups as the {sceenRoot}, but no success so far...
Thanks in advance!

NPE in onPreDraw

I've been getting reports of this exception from time to time showing up in our logs.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.support.v4.util.ArrayMap.get(java.lang.Object)' on a null object reference
	 at com.transitionseverywhere.TransitionManager$MultiListener.onPreDraw(SourceFile:293)
	 at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
	 at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2420)
	 at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1324)
	 at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6712)
	 at android.view.Choreographer$CallbackRecord.run(Choreographer.java:894)
	 at android.view.Choreographer.doCallbacks(Choreographer.java:696)
	 at android.view.Choreographer.doFrame(Choreographer.java:631)
	 at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:880)
	 at android.os.Handler.handleCallback(Handler.java:815)
	 at android.os.Handler.dispatchMessage(Handler.java:104)
	 at android.os.Looper.loop(Looper.java:207)
	 at android.app.ActivityThread.main(ActivityThread.java:5728)
	 at java.lang.reflect.Method.invoke(Native Method)
	 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
	 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

Looking at the code, I noticed this:

            // Add to running list, handle end to remove it
            final ArrayMap<ViewGroup, ArrayList<Transition>> runningTransitions =
                    getRunningTransitions();
            ArrayList<Transition> currentTransitions = runningTransitions.get(mSceneRoot);

It appears that getRunningTransitions() may be giving me a null pointer. When I looked at the code for this, I noticed it's using WeakReferences. It appears to be possible that the garbage collector is deleting the reference before the final call to runningTransitions.get() is completed, leading to the NPE I'm experiencing.

I haven't been able to find exact reproduction steps yet, but I find them I'll post them here.

Backport for PathMotion

Applying PathMotion for animation ignores for now (partially work on Lollipop). Not so easy to backport.

Path animating FramLayout inside CoordinationLayout

i have a CoordinationLayout having FramLayout(Constains a Fab and other view) inside of it with anchor_gravity="top|right|end" and i want to apply ArchMotion on it that changes it's anchor
gravity to center and i did like the PathMotion sample exactly here is a screenshot of the layout:-
device-2017-03-15-205256

and here is the layout code:

`

<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

    <fragment xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/map"
        android:layout_weight="0.8"
        android:name="com.google.android.gms.maps.SupportMapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="com.lavishagency.matab.activities.RouteFilterActivity"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_weight="3.4"
        android:orientation="vertical"
        android:id="@+id/llDetails"
        android:padding="16dp"
        android:background="@android:color/white"
        android:layout_height="match_parent">
        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/shimmer_view_container"
            android:layout_width="wrap_content"

            android:layout_height="wrap_content"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                <com.lavishagency.matab.views.MatabTextView
                    android:layout_width="wrap_content"
                    android:text="9 hr 55 min (14 km)"
                    android:textSize="20sp"
                    android:textColor="@color/white_grey"
                    android:background="@color/white_grey"
                    android:id="@+id/tvTimeAndDist"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/Base.TextAppearance.AppCompat.Body1"
                    />
                <com.lavishagency.matab.views.MatabTextView
                    android:layout_width="wrap_content"
                    android:text="17 Bumps"
                    android:id="@+id/tvBumps"
                    android:layout_marginTop="8dp"
                    android:textColor="@color/white_grey"
                    android:background="@color/white_grey"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
                    />
            </LinearLayout>

        </com.facebook.shimmer.ShimmerFrameLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:id="@+id/LLGoFabs"
            android:visibility="gone"
            android:layout_height="match_parent"
            android:orientation="horizontal">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:id="@+id/llFabAdd"
                android:clickable="true"
                android:layout_weight="1">
                <android.support.design.widget.FloatingActionButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/ic_add"
                    android:layout_marginBottom="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginLeft="8dp"
                    android:layout_marginRight="8dp"
                    android:layout_marginStart="8dp"
                    app:fabSize="mini"
                    android:layout_gravity="center"
                    app:backgroundTint="#2ECC71"
                     />
                <com.lavishagency.matab.views.MatabTextView
                    android:layout_width="wrap_content"
                    android:text="Add Bump"
                    android:layout_gravity="center"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:clickable="true"
                android:id="@+id/LLFabRemove"
                android:layout_weight="1">
                <android.support.design.widget.FloatingActionButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/ic_report"
                    android:layout_marginBottom="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginLeft="8dp"
                    android:layout_marginRight="8dp"
                    android:layout_marginStart="8dp"
                    app:fabSize="mini"
                    android:layout_gravity="center"
                    app:backgroundTint="#E74C3C"
                    />
                <com.lavishagency.matab.views.MatabTextView
                    android:layout_width="wrap_content"
                    android:text="Report Bump"
                    android:layout_gravity="center"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:id="@+id/LLFabHelp"
                android:clickable="true"
                android:layout_weight="1">
                <android.support.design.widget.FloatingActionButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/ic_help"
                    android:layout_marginBottom="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginLeft="8dp"
                    android:layout_marginRight="8dp"
                    android:layout_marginStart="8dp"
                    app:fabSize="mini"
                    android:layout_gravity="center"
                    app:backgroundTint="#3498DB"
                    />
                <com.lavishagency.matab.views.MatabTextView
                    android:layout_width="wrap_content"
                    android:text="Send Help"
                    android:layout_gravity="center"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
                    />
            </LinearLayout>
        </LinearLayout>
        </LinearLayout>
    </LinearLayout>

<FrameLayout
    android:layout_width="wrap_content"
    app:layout_anchor="@id/llDetails"
    android:layout_margin="8dp"
    android:id="@+id/flAnimation"
    app:layout_anchorGravity="top|right|end"
    android:layout_height="wrap_content">
    <com.airbnb.lottie.LottieAnimationView
        android:layout_width="84dp"
        android:layout_height="84dp"
        android:layout_gravity="center"
        app:lottie_loop="true"
        app:lottie_fileName="Pulse.json"
        android:id="@+id/fabNav"
        />
    <android.support.design.widget.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_navigatre"
        android:id="@+id/fabNav2"
        android:layout_gravity="center"
        app:backgroundTint="#FFF"
        android:tint="@color/colorAccent"
        app:fabSize="normal"
        />

</FrameLayout>

</android.support.design.widget.CoordinatorLayout>
`

I want to animate the framlayout with id flAnimation and the view it contains (FloatingActionButton and LottieAnimationView)

i attach click listener to FAB and LottieAnimationView and here is the code inside

TransitionManager.beginDelayedTransition(coordinatorLayout, new ChangeBounds().setPathMotion(new ArcMotion()).setDuration(1000)); CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) flAnimation.getLayoutParams(); lp.anchorGravity = Gravity.CENTER; flAnimation.setLayoutParams(lp);

what happened is that the FramLayout(llDetails) and it's view moving to the center without any animation happens

How to use .addListener ?

I want to implement simple animation which slides to left to screen off and than slides from right to left.
I do something like this:

ivPicture.setOnClickListener(new View.OnClickListener() {

                boolean visible = true;

                @Override
                public void onClick(View view) {
                    TransitionSet set = new TransitionSet();
                    set
                        .addTransition(new Slide(Gravity.RIGHT))
                        .addTransition(new Slide(Gravity.LEFT))
                        .addListener(new Transition.TransitionListenerAdapter(){

                            @Override
                            public void onTransitionEnd(Transition transition) {
                                    TransitionManager.beginDelayedTransition(container, new Slide(Gravity.LEFT));
                                    visible = !visible;
                                    ivPicture.setVisibility(visible ? View.VISIBLE : View.GONE);
                            }

                        })
                        ;
                    TransitionManager.beginDelayedTransition(container, set);

                }
            });

but I can't understand what the hell is going on((
Unexpected onTransitionEnd fires immediatly after animation starts. Could you explain what am I doing wrong ?

Is there any tricks to make transitions with shared elements?

As far as I understood transitions with shared elements applying at Activity, which means that standard methods such as "setSharedElementReturnTransition(Transition transition)" and "setExitTransition(Transition transition)" couldn't be applied and I need to create some custom activity with overridden Transitions framework processing in order to use your TransitionsEverywhere library? Am I right or have I missed something?

Targets of a Transition is not removed while using removeTarget (int targetId)

Consider the following code:

 Transition transition = ...;

 transition.addTarget(R.id.my_view);

 ...

 transition.removeTarget(R.id.my_view);

It is apparent from the documentation that the call to Transition.removeTarget(int) should remove the view with id R.id.my_view being included in further transitions. But instead the following error will be shown:

 Caused by: java.lang.IndexOutOfBoundsException: Invalid index <some-random-int>, size is 1
        at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
        at java.util.ArrayList.remove(ArrayList.java:403)

this is because the implementation is calling ArrayList.remove(int) instead of ArrayList.remove(Object).

PS: the upstream bug is at http://b.android.com/167061 or here

use transition to with intents

Hello, I using your library for my android app and I want to use your transition with Intents e.g. when I change activity I want add some animation but when I do it with your library It animate at first and next change activity. How can I do it or is it impossible?

Fade transition displays its target views above targets of other transitions.

Hi,

When I try to run a fade transition, and the equavalent of a 'move' transition in the same set, the fading elements always appear above the elements that move. Transition order or target view z order doesn't seem to matter at all. I've observed this behavior in both api v16 and v23.

Is there any way to enforce some kind of z-ordering for views of these transitions?

NullPointer in ChangeImageTransform with drawableWidth or drawableHeight equals 0

java.lang.NullPointerException
at android.animation.PropertyValuesHolder.setObjectValues(PropertyValuesHolder.java:359)
at android.animation.PropertyValuesHolder.ofObject(PropertyValuesHolder.java:204)
at android.animation.ObjectAnimator.setObjectValues(ObjectAnimator.java:351)
at android.animation.ObjectAnimator.ofObject(ObjectAnimator.java:260)
at android.transitions.everywhere.utils.AnimatorUtils.ofObject(AnimatorUtils.java:303)
at android.transitions.everywhere.ChangeImageTransform.createMatrixAnimator(ChangeImageTransform.java:177)
at android.transitions.everywhere.ChangeImageTransform.createNullAnimator(ChangeImageTransform.java:172)
at android.transitions.everywhere.ChangeImageTransform.createAnimator(ChangeImageTransform.java:157)
at android.transitions.everywhere.Transition.createAnimators(Transition.java:734)
at android.transitions.everywhere.TransitionSet.createAnimators(TransitionSet.java:404)
at android.transitions.everywhere.Transition.playTransition(Transition.java:1766)
at android.transitions.everywhere.TransitionManager$1.onPreDraw(TransitionManager.java:257)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:703)

Animating the container itself.

Hey, first I wanna say thank you a lot for this library.

I've been using it and it seems to me that only the children of the container ViewGroup gets animated, is there any way it could animate the container itself too? (Without needing to pass in the parent as the container to beginDelayedTransition())

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.