Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing changeBounds animation in xml ignores attributes(?) #6

Closed
loeschg opened this issue Nov 11, 2014 · 9 comments
Closed

Customizing changeBounds animation in xml ignores attributes(?) #6

loeschg opened this issue Nov 11, 2014 · 9 comments

Comments

@loeschg
Copy link

loeschg commented Nov 11, 2014

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;
@andkulikov
Copy link
Owner

thanks! i will try to fix both of your issues

@loeschg
Copy link
Author

loeschg commented Nov 11, 2014

Awesome! Let me know if I can assist.

@loeschg
Copy link
Author

loeschg commented Nov 11, 2014

Is this library essentially a fork of TransitionsBackport (see referenced ticket)? I get the same issue with that as well.

@andkulikov
Copy link
Owner

my library based on https://github.com/pardom/TransitionSupportLibrary and TransitionsBackport both with many my fixes and merge with api changes from android 5.0. for now it`s the most fully functional variant of transitions. and i want to fix all problems with my library)

@mdrabic
Copy link
Contributor

mdrabic commented Nov 11, 2014

Updated
After rereading the documentation I was not creating my Scene the correct way. The transition now works as expected but I do still see the Could not find method... errors.

I wanted to confirm that I am having the same issue. In short when I call the following `TransitionManager.go(new Scene(myViewGroup), new Slide());`, I get the same exact error message.

11-11 17:36:24.472    6730-6730/com.mdrabic.metamorph I/dalvikvm﹕ Could not find method android.animation.PropertyValuesHolder.ofObject, referenced from method android.transitions.everywhere.ChangeBounds.createAnimator
11-11 17:36:24.472    6730-6730/com.mdrabic.metamorph 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 17:36:24.472    6730-6730/com.mdrabic.metamorph D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0314

@loeschg
Copy link
Author

loeschg commented Nov 12, 2014

Looks to be fixed in the new snapshot!

repositories {
  mavenCentral()
  maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
  compile "com.github.andkulikov:transitions-everywhere:1.2.0-SNAPSHOT"
}

@loeschg
Copy link
Author

loeschg commented Nov 12, 2014

Also, I still seem to see the errors, as @mdrabic saw. Must be unrelated to the issue.

@andkulikov eta for official release?

@andkulikov
Copy link
Owner

this issue is not completely fixed yet. i will fix errors from logs soon and put final version on maven

@andkulikov
Copy link
Owner

fixed on version 1.2.0.

now i recommend to use app namespace instead of android. example:

but only for duration and interpolator attributes you can continue to use android: namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants