Hey,
I am working on an app with mutliple screens and much content on each screen. To switch between screens I’m currently working with these blocks:
But everytime I switch between screens the app does nothing for 1-2 seconds.
Is there any way to stop the app from doing nothing for 1-2 seconds?
I think it’s because the “open another screen” block. It simply makes the screen reinitialize and the screens starts building everything again.
A mix of both. I already reduced the amount of blocks and assets to as less as possible.
I’m just looking for a better way to switch between screens more smoothly. If there is any.
sometimes these blocks mess up with the app it happened to me also, try to use simple OpenAnotherScreen Block and see does your problem go away ? coz mine did go
Already tried. Doesn’t help me.
I think I just need a “switchScreen” block.
“open another Screen” opens a new screen which makes the app doing nothign for few seconds. I need a block which opens the screen, which is still open in background, not a new screen.
you can call this a switchScreen block coz it doesnt close the current screen, it just heads over to next screen, and that block you showed in first post that closes the current screen and then opens another. However this is recommended for smooth performance but it messes up sometimes
I already am using this block, but it doesn’t help that much. But thanks for your effort. I’m gonna just set the screen invisible before swtiching screens to make it look more smoothly. Thanks everyone!
The error posted by @derf4lk3 can be due to any other reason along with the one as @Peter suggested. But the block suggested by you have greater chances of causing Out Of Memory error as according to your blocks the current screen will always remain open and will slowly consume memory and hence the error.
yes i agree with you, but when I used these blocks on Screen1 and when i reopened the app after exiting it,
it opened like this, - I clicked the app icon, it showed the splash screen, then it closed, then i re clicked the app icon then it launched correctly.,
i used simple OpenanotherScreen block and the problem was solved,