Skip to content

Instantly share code, notes, and snippets.

@sharifulislam52
Last active March 2, 2018 13:00
Show Gist options
  • Save sharifulislam52/d61c45bc14f579c41286373bd635f507 to your computer and use it in GitHub Desktop.
Save sharifulislam52/d61c45bc14f579c41286373bd635f507 to your computer and use it in GitHub Desktop.
<!-- Rotation 0 to 180 degree -->
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<rotate
android:duration="150"
android:fromDegrees="0"
android:toDegrees="180"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
/>
</set>
Animation animation = AnimationUtils.loadAnimation(your_Activity.getApplicationContext(),R.anim.animation_xml_file);
AnyView target_view = (AnyView)findViewById(R.id.target_view_id);
target_view.startAnimation(animation);
// animation, your_Activity, animation_xml_file, AnyView, target_view, target_view_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment