-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53de605
commit 1295b78
Showing
42 changed files
with
464 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
49 changes: 49 additions & 0 deletions
49
animationdemo/src/main/java/com/xingzhiqiao/animationdemo/EnterActiviy.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.xingzhiqiao.animationdemo; | ||
|
||
import android.animation.Animator; | ||
import android.animation.AnimatorListenerAdapter; | ||
import android.animation.AnimatorSet; | ||
import android.animation.ObjectAnimator; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.animation.AccelerateDecelerateInterpolator; | ||
import android.widget.ImageView; | ||
|
||
/** | ||
* Created by xingzhiqiao on 2016/11/17. | ||
*/ | ||
|
||
public class EnterActiviy extends AppCompatActivity { | ||
|
||
|
||
private ImageView mBg; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_enter); | ||
mBg = (ImageView) findViewById(R.id.bg_boy); | ||
|
||
|
||
AnimatorSet set = new AnimatorSet(); | ||
set.playTogether( | ||
ObjectAnimator.ofFloat(mBg, "scaleX", 1, 1.5f), | ||
ObjectAnimator.ofFloat(mBg, "scaleY", 1, 1.5f)); | ||
set.setDuration(2000); | ||
set.addListener(new AnimatorListenerAdapter() { | ||
@Override | ||
public void onAnimationEnd(Animator animation) { | ||
super.onAnimationEnd(animation); | ||
Intent intent = new Intent(EnterActiviy.this, MainActivity.class); | ||
EnterActiviy.this.startActivity(intent); | ||
finish(); | ||
} | ||
}); | ||
set.setInterpolator(new AccelerateDecelerateInterpolator()); | ||
set.start(); | ||
|
||
} | ||
|
||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:duration="300" | ||
android:interpolator="@android:anim/decelerate_interpolator" | ||
android:shareInterpolator="true"> | ||
|
||
<alpha | ||
android:fromAlpha="0.0" | ||
android:toAlpha="1.0" /> | ||
<scale | ||
android:fromYScale="0.5" | ||
android:toYScale="1.2" /> | ||
|
||
</set> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:animation="@anim/anim_item" | ||
android:animationOrder="normal" | ||
android:delay="0.5"></layoutAnimation> |
Oops, something went wrong.