欢迎界面淡入淡出效果
welcome布局
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/logo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/start"
android:orientation="vertical"
android:scaleType="fitXY" >
</ImageView>
welcome.java
welcomeImg = (ImageView) findViewById(R.id.logo);
AlphaAnimation animail = new AlphaAnimation(0.1f, 1.0f);
animail.setDuration(3000);
welcomeImg.startAnimation(animail);
animail.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
startActivity(new Intent(Welcome.this, MainActivity.class));
finish();
}
});