У меня есть приложение, которое показывает список элементов. Мне нужно отобразить изображение затухания перед началом основного действия. я попробовал что-то вроде этого в onCreate метод основной деятельности я начал одна анимационная деятельность, например
Intent animationIntent=new Intent(this,AnimationActivity.class);
startActivityForResult(AnimationIntent);
в onCreate метод AnimationActivity.class
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageView introanim = (ImageView) findViewById(R.id.imgView);
AnimationSet StoryAnimation = (AnimationSet)AnimationUtils.
loadAnimation(this, R.anim.alphanim);
StoryAnimation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationRepeat(Animation animation) {
AnimationSubActivity.this.finish();
}
@Override
public void onAnimationEnd(Animation animation) {
AnimationSubActivity.this.finish();
}
});
introanim.clearAnimation();
introanim.startAnimation(StoryAnimation);
и мой main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/imgView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/icon"
/>
</LinearLayout>
Проблема с этим подходом заключается в том, что он отображает амитацию, но изображение просматривается некоторое время, а основное действие происходит с эффектом перехода слайдов
но я хочу, чтобы изображение исчезло, и моя активность исчезла в
любая помощь будет оценена. Спасибо заранее