I would like to create a splash screen for an app I hope to make. My first solution was to display a new layout for a few seconds and then display a new layout like so:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.logo)
android.os.SystemClock.sleep(5000);
setContentView(R.layout.activity_main);
}
But the problem is that it displays a white screen for 5 seconds then goes to my main screen. I Thought I could tackle this problem by creating a new method or class and change the layout from there but using a method did nothing and creating a class only proved to be more difficult because I'm pretty sure I'd have to use AsyncTask. I feel like there is a very easy solution I don't know about. Thanks in advance, Mr. Schmuck