This code of mine is not working... I have checked all the links on this site and also tried animation listener but still its not working.
public class SplashScreenPage extends Activity implements Runnable{
Thread splash;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash_screen_page_layout);
splash = new Thread(this);
splash.start();
}
@SuppressWarnings("static-access")
@Override
public void run() {
try {
splash.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Intent intent = new Intent(SplashScreenPage.this,LoginPage.class);
startActivity(intent);
finish();
SplashScreenPage.this.overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
}
@Override
protected void onPause() {
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
super.onPause();
}
}