In my app I'm trying to create a "loading screen" so the user knows what's happening and doesn't think the app is lagging when loading a new view upon releasing a button. I'm trying to have my "setViewVisibility" method run before the rest of the code but I can't seem to make it work. The way I have it set up right now is that there's an instance boolean that gets changed when one action is completed but for some reason it's not working. Any ideas on how I could fix this?
if(isLoadScreen == true){
setViewVisibility(visibility.END);
buttoni.setAlpha((float) 1);
isLoadScreen = false;
}
if (isLoadScreen == false){
setKeysList(list);
startQuestion(keysList.get(0));
currentQuestion = 0;
isLoadScreen = true;
}