blipinsk / viewpropertyobjectanimator Goto Github PK
View Code? Open in Web Editor NEWWrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator
License: Apache License 2.0
Wrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator
License: Apache License 2.0
Hi,
I am using https://github.com/arimorty/floatingsearchview which uses your library and seems to be lacking proguard rules for your library.
I have already open an issue, but want to know if you have any pre-define proguard-rules when using your ViewPropertyObjectAnimator library?
Thanks.
Stacktrace:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator; at com.arlib.floatingsearchview.FloatingSearchView.transitionInLeftSection(FloatingSearchView.java:1406) at com.arlib.floatingsearchview.FloatingSearchView.setSearchFocusedInternal(FloatingSearchView.java:1319) at com.arlib.floatingsearchview.FloatingSearchView.access$1500(FloatingSearchView.java:87) at com.arlib.floatingsearchview.FloatingSearchView$7.onFocusChange(FloatingSearchView.java:609) at android.view.View.onFocusChanged(View.java:5723) at android.widget.TextView.onFocusChanged(TextView.java:8224) at android.view.View.handleFocusGainInternal(View.java:5478) at android.view.View.requestFocusNoSearch(View.java:8476) at android.view.View.requestFocus(View.java:8455) at android.view.View.requestFocus(View.java:8422) at android.view.View.requestFocus(View.java:8401) at android.view.View.onTouchEvent(View.java:10305) at android.widget.TextView.onTouchEvent(TextView.java:8300) at android.view.View.dispatchTouchEvent(View.java:9300) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737) at android.app.Activity.dispatchTouchEvent(Activity.java:2771) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60) at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364) at android.view.View.dispatchPointerEvent(View.java:9520) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4238) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4104) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3650) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3703) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3669) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3795) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3677) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3852) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3650) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3703) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3669) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3677) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3650) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5932) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5906) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5867) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6035) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:323) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5422) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.bartoszlipinski.viewpropertyobjectanimator.ViewProp ertyObjectAnimator" on path: DexPathList[[zip file "/data/app/net.zedge.snakk-2/base.apk"],nativeLibraryDirectories=[/d ata/app/net.zedge.snakk-2/lib/arm64, /vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) ... 71 more Suppressed: java.lang.ClassNotFoundException: com.bartoszlipinski.viewpropertyobjectanimator.ViewPropertyObjectAnim ator at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 72 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available FlurryAgent W Error logged: uncaught Flurry session ended
Add method waitForParams()
(returning void
!) that can be called instead of start()
.
The ObjectAnimator
has to be built (and started), when the View
gets its LayoutParams
. If LayoutParams
are available at the moment of call (of the waitForParams
method), the Animator
should be built and started right away. If LayoutParams
are not available, a proper OnAttachStateChangeListener
should be added for the animated View
.
This library works great and I want to include it in an app for the play store.
I would like to give you credit for the library.
Could you update the project with a license?
If i try to animate a layout with an ImageView , the bitmap inside the imageview is not scaled to the ImageView size but remains full size.
Hey hey,
Using custom bintray repo is a bit unusual, and mavenCentral only has up to 1.4.5.
Any chance of updating to 1.5.0 on mavenCentral too?
Just curious, but technically bintray works well for me atm too ๐
I'm trying to animate height
changing and duration
parameter is ignored. This is my code:
val height = View.MeasureSpec.makeMeasureSpec(this.height, View.MeasureSpec.EXACTLY)
ViewPropertyObjectAnimator.animate(this)
.heightBy(0)
.height(height)
.setDuration(duration)
.start()
The point is when I set final height to 0, it works perfectly:
val height = View.MeasureSpec.makeMeasureSpec(this.height, View.MeasureSpec.EXACTLY)
ViewPropertyObjectAnimator.animate(this)
.heightBy(height)
.height(0)
.setDuration(duration)
.start()
Any suggestion?
Hey! I love this library and recommend it each time.
However, I think it's still using Android Support Lib and therefore needs Jetifier.
Do you think it's possible to AndroidX-ify it, or would that be tricky due to the separation of libraries like for example the animated properties for PercentLayout?
When animating a percent change for a PercentRelativeLayout
the setDuration is ignored causing the animation to execute immediately. Even when added to a AnimatorSet with a duration the animation still executes immediately.
val detailAnim = ViewPropertyObjectAnimator.animate(detail)
.widthPercent(100F)
.setDuration(3000).start()
I've just ended up with my app called ViewPropertyObjectAnimator
, I'm pretty sure this string resource is not needed for the library to work ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.