import android.content.Intent;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;
public class IntroViewAcitivity extends BaseActivity {
protected static final String TAG = "IntroViewActivity";
private ImageView logoView;
private AnimationDrawable mAni;
final Handler mHandler = new Handler();
Runnable startAni;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Log.i(TAG, "OnCreate() ::::::::::::::::::::");
setContentView(R.layout.intro_view_ani);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Intent intent = new Intent(IntroViewAcitivity.this, TitleViewActivity.class);
startActivity(intent);
IntroViewAcitivity.this.finish();
}
}, 3000);
}
});
animation.setDuration(2000);
logoView = (ImageView)findViewById(R.id.logoAni);
logoView.startAnimation(animation);
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
}
}