1

I am working on libgdx program with 2 screens named "Show Info.". A 'startup' screen always popup first. How could I hide it?

screen dump for libgdx 'startup' screen

Thank you very much!

Regards, Antony

Community
  • 1
  • 1
Lai
  • 115
  • 1
  • 6

2 Answers2

0

You are using Screen and Game classes?

@Override
public void create() {
    mainMenuScreen = new MainMenuScreen(this);
    anotherScreen = new AnotherScreen(this);
    setScreen(mainMenuScreen);              
}

Make sure you call the setScreen method.

I'm a little unclear on what you are asking, could you elaborate a little more? What is this 'startup' screen you are receiving?

badcc
  • 222
  • 4
  • 18
0

Use Service instead of Activity .. The Service can be working in the background without a UI.

Example to use the service

public class MyService extends Service {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//TODO do something useful
return Service.START_NOT_STICKY;
}

@Override
public IBinder onBind(Intent intent) {
//TODO for communication return IBinder implementation
return null;
}
} 
Sami Eltamawy
  • 9,874
  • 8
  • 48
  • 66
  • Thank you for your reply, I will try. And answer to badcc: Yes, I use Screen and Game classes. I just change the 2 tutorial with 2 screen as my program. Thank you both of you. – Lai Feb 06 '14 at 12:44