How to run one method (task) after another, but in one thread?

  • five
    I just want to answer by dividing them ";" But you still have to reveal a little more what you mean :) - Evgeny Karavashkin
  • one
    Quickly, decisively! - igumnov
  • one
    And what caused you difficulties? Show the code. - VladD
  • <name of your first method> (); <name of your Second Method> (); - Vladyslav Matviienko

1 answer 1

public class MainActivity extends ListFragmentStackActivity { method1(); } public void method1() { Toast.makeText(this, "Я метод 1", Toast.LENGTH_LONG).show(); method2(); } public void method2() { Toast.makeText(this, "Я метод 2", Toast.LENGTH_LONG).show(); method1(); }