Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Added androidx.core.view.ViewPropertyAnimator #567

Closed
wants to merge 1 commit into from
Closed

Added androidx.core.view.ViewPropertyAnimator #567

wants to merge 1 commit into from

Conversation

MonteCreasor
Copy link

@MonteCreasor MonteCreasor commented Jun 7, 2018

Added androidx.core.view.ViewPropertyAnimator based on androidx.core.animation.Animator. Each extension function returns the ViewPropertyAnimator receiver so that they can be used within the existing anddroid.core.view.ViewPropertyAnimator builder pattern. Also, this extension file does not include doOnPause or doOnResume support.

I guess the thing to consider is that you can't chain multiple 'doOn...' calls since the ViewPropertyAnimator only allows a single listener. Maybe you've already considered that and have decided that since each consecutive 'doOn...' call will overwrite the listener of any previous call, this will lead to accidental complexity. Nonetheless, I personally like the convenience of these extensions.

If you want, I could add an additional comment to each function to warn the caller, for example for the doOnEnd extension:

/**

  • Add an action which will be invoked when the animation has ended.
  • Note that since ViewPropertyAnimator only supports a single listener, only the last "doOn"
  • call will be invoked. Use the [setListener] extension when more than one callback is desired.
  • @return the [ViewPropertyAnimator] receiver.
  • @see Animator.end
    */

…animation/Animator. Each extension function returns the ViewPropertyAnimator receiver so that they can be used within the existing anddroid.core.view.ViewPropertyAnimator builder pattern. Also, this extension file does not include doOnPause or doOnResume support.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@MonteCreasor MonteCreasor changed the title Added androidx.core.view.ViewPropertyAnimator based on androidx.core.… Added androidx.core.view.ViewPropertyAnimator Jun 7, 2018
@MonteCreasor
Copy link
Author

I've signed it!

@googlebot
Copy link

CLAs look good, thanks!

@romainguy
Copy link
Collaborator

Thank you for the PR, this is unfortunately a duplicate of #560.

@romainguy romainguy closed this Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants