-2

I am doing a small game, and at the first screen I have made a loading screen. After that I made a second screen. My problem that when I use the emulator it stays on the first screen which is the loading screen. What should I do to connect the first screen with the second?

NOTE: I am using Android Studio, and there is no buttons on the first screen.

If anyone could suggest a video tutorial for my problem, that would be awesome.

Thanks!

AkashBhave
  • 749
  • 4
  • 12
  • u can use slide scroll to second activity – Mohad Hadi May 17 '16 at 20:32
  • Possible duplicate of [How to start new activity on button click](http://stackoverflow.com/questions/4186021/how-to-start-new-activity-on-button-click) – RominaV May 17 '16 at 20:58
  • This is not how it works. Have you learnt the basics ? We are not teachers, or video seekers for you. Go read [this tutorial] (https://docs.oracle.com/javase/tutorial/), try doing it by yourself and if it doesn't work, come and ask a concrete question. You ask: `How can I connect my first screen with the second screen?` I answer: `Close the first one and open the second one`. If you want precise answers, do precise questions. Welcome to stackoverflow. – UDKOX May 17 '16 at 22:05

1 Answers1

1

You need to have some trigger to call another activity, which in your case it might be when all your data is loaded. It could be something like this:

while(yourDataIsNotLoaded){
    //your loading code inside here
}
Intent i = new Intent(getApplicationContext(), SecondActivity.class);
startActivity(i);

Considering that the second screen refers to SecondActivty.