I want to start a new activity after a period of time on button click, but the problem is there that first i want to recreate the A.activity than to start B.activity after a period of seconds.
animation2.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
en.setVisibility(View.VISIBLE);
al.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
en.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
locale = new Locale(" ");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config,
getBaseContext().getResources().getDisplayMetrics());
LanguageActivity.this.recreate();
startActivity(new Intent(LanguageActivity.this, ServicesActivity.class));
}
});