Skip to content

Instantly share code, notes, and snippets.

@flyfire
Forked from simon-heinen/shake.xml
Created July 1, 2023 09:08
Show Gist options
  • Save flyfire/81687d722aaa577614d86b08ac47a66e to your computer and use it in GitHub Desktop.
Save flyfire/81687d722aaa577614d86b08ac47a66e to your computer and use it in GitHub Desktop.
A simple shake / wiggle animation for Android
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="70"
android:fromDegrees="-5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="5"
android:repeatMode="reverse"
android:interpolator="@android:anim/linear_interpolator"
android:toDegrees="5" />
<translate
android:fromXDelta="-10"
android:toXDelta="10"
android:repeatCount="5"
android:repeatMode="reverse"
android:interpolator="@android:anim/linear_interpolator"
android:duration="70" />
</set>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment