-
-
Save mortenjust/465b62b63799bddd0c88 to your computer and use it in GitHub Desktop.
Android animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Animation wobble = AnimationUtils.loadAnimation(this, R.anim.wobble); | |
//Now we can play the animation like this on our chosen UI object, in this case our button1 object: | |
button1.startAnimation(wobble); | |
//https://www.safaribooksonline.com/library/view/learning-java-by/9781784398859/ch05s05.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="100" | |
android:fromDegrees="-5" | |
android:pivotX="50%" | |
android:pivotY="50%" | |
android:repeatCount="8" | |
android:repeatMode="reverse" | |
android:toDegrees="5" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment