Created
July 9, 2019 08:24
-
-
Save erdemtopak/dc9dc52db4e749e42e71ff0bb23454eb to your computer and use it in GitHub Desktop.
Shake Animation for TextInputFields
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
/* res/anim/shake.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<translate | |
android:duration="50" | |
android:fromXDelta="-0.3%" | |
android:repeatCount="5" | |
android:repeatMode="reverse" | |
android:toXDelta="0.3%"/> | |
</set> | |
*/ | |
val shakeAnimation = AnimationUtils.loadAnimation(this, R.anim.shake) | |
view.startAnimation(shakeAnimation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment