我有一个显示项目列表的应用程序。我需要在主要活动开始之前显示淡出图像。 我想类似的东西 在主要活动中的onCreate方法我开始 一个动漫活动像如何在android中实现启动画面
Intent animationIntent=new Intent(this,AnimationActivity.class);
startActivityForResult(AnimationIntent);
在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);
的onCreate方法和我的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>
这种方法的问题是,它显示一个amimation,但imageview来屏幕f或一段时间,主要活动都带有幻灯片过渡效果
,但我想我的图像淡出我的活动应该淡入
任何帮助将不胜感激。在此先感谢
@ user609765如果答案解决了您的问题,那么您应该接受它请 – MorningGlory