package com.example.skpm2;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
public class intro extends Activity
{
ImageView intro;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.intro);
new Thread(new Runnable()
{
public void run()
{
try
{
intro=(ImageView)findViewById(R.id.logo);
Animation alphaAnim=AnimationUtils.loadAnimation(intro.this, R.anim.alpha);
intro.startAnimation(alphaAnim);
Thread.sleep(2000);
isIntro();
}
catch (Exception e)
{}
}
}).start();
}
private void isIntro()
{
Intent intent =new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);
finish();
}
}
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
이걸 어디에 집어넣어야 페이드 효과가 날까요?
ㅠㅠ
애니메이션은 순서가 중요하다고 들었습니다.ㅠㅠ
startActivity 뒤에 넣어주시면 될것 같네요 ^^;