I have a method setup that takes about 3-5 seconds to run (because it does something online) and I would like to show a loading dialog, but I cant figure out how to do it, I tried starting the loading dialod before I called the method then tried to dismiss it right after like this:
dialog.show();
myMethod();
dialog.cancel();
But that didn't work, does anyone have any suggestions?