How to call another Activity/Canvas with Java in Totalcross?

Asked

Viewed 61 times

1

I am developing an application with java through a tool called Totalcross and I need to call another screen/actividy but I do not know what code to do this.

In android would be the equivalent of this:

public void ChamaRelatorios(View view){
    Intent intent = new Intent(this, Relatorios.class);
    startActivity(intent);
}

1 answer

1

To call a screen in Totalcross is very simple. If you are in Mainwindow and want to call a class you inherit from container you use this command:

 public void initUI() {
         this.swap(new NomeClasse());
 }

But if you are already in a class that you inherit from container and want to call another, you use this command here:

 MainWindow.getMainWindow().swap(new NomeClasse());

Browser other questions tagged

You are not signed in. Login or sign up in order to post.