Last active
March 2, 2018 12:59
-
-
Save sharifulislam52/c60edc0bdf60fbebca63c43507a8260e to your computer and use it in GitHub Desktop.
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
<!-- View size 100% to 0% with time duration and alpha (transparency) --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" | |
android:fillAfter="true"> | |
<scale | |
android:duration="150" | |
android:fromXScale="1.0" | |
android:fromYScale="1.0" | |
android:toXScale="0.0" | |
android:toYScale="0.0" | |
android:interpolator="@android:anim/linear_interpolator" | |
android:pivotX="50%" | |
android:pivotY="50%" | |
/> | |
<alpha | |
android:duration="150" | |
android:fromAlpha="1.0" | |
android:toAlpha="0.0" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
/> | |
</set> |
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 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