Closed harshitagupta30 closed 7 years ago
@harshitagupta30 Before you try to fix it,can you identify the cause behind it and how you are planning to resolve it?
@anubhakushwaha That is happening because of the android's cold start. If we are running any type of processing code in our splash screen, all your processing code will run before the screen draws its components in Android so the white screen appears for few seconds. But when I checked the app on the other devices it's working absolutely fine. That's an issue with zenfone2. So, I guess you can close this issue. :)
@anubhakushwaha Its happening on other devices too. I checked on Moto X style nd Nexus 5. Maybe we can put it on hold until someone find the root cause for this.
In order to avoid hiccups and visually respond as soon as possible to the user interaction, the system displays a temporary window: the “starting window” also known as the “preview window” which is white by default.There are pretty many ways methods to resolve this,further I hope after resolving #42 we will have less resources to preload . @harshitagupta30 @codingblazer Incase you want to work upon it let us know :)
@anubhakushwaha Hi, I am willing to work on this issue :)
Go ahead and let us know the best solution you can implement :+1:
@anubhakushwaha I have a way around for this. Since nearly every app except you-tube shows white screen on its start up. We can implement the same method what you-tube is using. I am uploading a working solution if you like it then I can send a PR.
@anubhakushwaha If we add "
Can I send the PR for this? :)
@anubhakushwaha The solutions mentioned above are good but they just hides the white screen but not actually reduce startup time. If you say, we can combine these solutions (I can reduce startup time and @harshitagupta30 can add theme) which will be best solution.
@codingblazer How are you planning to reduce the startup time? and @harshitagupta30 please attach a gif of your implemented work.
@anubhakushwaha Check this out :)
@harshitagupta30
I think what you have done is that you have disabled the preview window
.
If so the drawback is that app will take more time to start. The time for which user has to wait for the launcher activity to draw on the screen will remain the same.
or If you have used some other approach please tell.
@free4murad yeah I have done that thing only. I don't think its increasing any significant amount of time during startup.
@harshitagupta30 I never said it increase the launch time it keeps it the same.
@free4murad but in above comment you mentioned that "the drawback is that app will take more time to start" but I couldn't find that happening.
@harshitagupta30 Oh sorry, made a mistake. My bad.
@free4murad No issues. Have you faced this issue while using disabled the preview window?
@harshitagupta30 Actually I was working on some other app sometime back and was facing the same problem.
I think the slow load is because of the complex and big UserMedicineSettingsFragmentActivity
.
Also UserMedicineSettingsFragmentActivity
has some memory leak as reported in issue #188 (It might also be responsible for the slow load).
Also if we add a welcome screen in the app (issue #115 ) this will be solved.
@free4murad Yeah I also have the same views! :+1: @anubhakushwaha Whats your opinion? :)
@anubhakushwaha I will be doing the profiling of the app using adb to measure the actual time for the cold startup. After this i will use the tools like Method tracer and inline tracing to identify the bottlenecks causing this problem and solve them. After this i will look for some common issues like memory leak, heavy initialization in onCreate(), global objects etc
@harshitagupta30 @free4murad @top-gun007 @codingblazer For the time being we can put this on a hold and would proceed with it as per the progress of #115
On startup just after installation, a white screen appears for approx 5 seconds and then the main screen appears.
@yatna and @chhavip please review the issue and let me know.