0
내 프로그램에서 애니메이션을 사용하고 싶지만 에뮬레이터에는 표시되지 않습니다. 애니메이션 리소스 전에 MenuActivity 클래스를 엽니 다.Android 애니메이션 디스플레이 prob
다음은 코드 파티션입니다.
Animation anim = AnimationUtils.loadAnimation(this, R.anim.fade_in);
ImageView girisLogo = (ImageView)findViewById(R.id.girisLogoImageView);
anim.reset();
girisLogo.clearAnimation();
girisLogo.startAnimation(anim);
anim.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
Intent intent = new Intent(GirisActivity.this,MenuActivity.class);
startActivity(intent);
GirisActivity.this.finish();
}
public void onAnimationRepeat(Animation animation) {}
public void onAnimationEnd(Animation animation) {}
});
}
fade_in.xml :
<set xmlns:android="https://schemes.android.com/apk/res/android">
<alpha
android:fromAlpha = "0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="4000"
/>
</set>
내가 anim.serDuration (400)를 사용하려고; 결과는 변하지 않습니다. 이 문제를 도와 줄 수 있습니까?
감사의 코드를 배치 할 때 시작하는 새로운 활동를 원하는 경우, ANIM을 볼 수 있습니다. – ugurgog