Android Question Replace initial blank activity with Splash Screen

Discussion in 'Android Questions' started by trueboss323, Apr 29, 2017.

  1. trueboss323

    trueboss323 Active Member Licensed User

    Right now, when the user opens my app, they are greeted with a black screen that lasts for a few seconds before the main activity appears. Instead I would like it to to have a splash screen of the app's icon , and then have that icon animate to zoom out to fit as the Activity action bar icon. Or something similar. So at least this gives a nice animation. I know this is possible and it shouldn't be difficult but I was unable to find any help with this.
     
  2. ronell

    ronell Well-Known Member Licensed User

  3. trueboss323

    trueboss323 Active Member Licensed User

    It's pretty good but it wasn't exactly what I'm looking for. Take for example the Youtube app when you open it , the youtube icon immediately appears with the splash screen sliding from the bottom to the top. Then it fades after a moment and shows the main activity.
     
  4. moster67

    moster67 Expert Licensed User

  5. trueboss323

    trueboss323 Active Member Licensed User

    That one is based on webview, which requries to have webview loaded to start the animation. The one i'm talking about loads instatly the moment you launch the app. You see this in apps like Youtube, Maps , Facebook, Twitter, etc.
     
  6. trueboss323

    trueboss323 Active Member Licensed User

    Anyone?

    I tried it again by opening the Youtube app , I get instantly greeted with the splash screen when I open it. With my app, I get a blank activity, with the Title bar at top while my app loads until LoadLayout is called. But even when I place this at the very beginning of the sub I still get that blank activity lasting for a few seconds , it would be much better if I could replace that with a splash screen just like Youtube and other Google apps .
     
  7. Erel

    Erel Administrator Staff Member Licensed User

  8. trueboss323

    trueboss323 Active Member Licensed User

    I am using the AppCompact theme. In your example when it says 'Waiting for IDE debugger to connect" there is a bit of a delay and shows that white screen. And that is the screen I am trying to replace with a splash screen.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Do you see the action bar at that point?
     
  10. trueboss323

    trueboss323 Active Member Licensed User

    When I start it up it's not visible for a few seconds before showing my main activity.
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    So this the above statement is not relevant, right?

    Why does it take your activity several seconds to show? What are you doing in Activity_Create (or Service_Create of the Starter service)?
     
  12. trueboss323

    trueboss323 Active Member Licensed User

    This just doesn't happen with my app , I have the same issue on other projects. I did a test of creating a simple app that doesn't load too many resources , but that still has the delay. Can this be an Android limitation ? But then how could apps like Youtube , Maps, Facebook not have this issue ?
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    I'm sorry but I still don't understand. If you are using AppCompat then you shouldn't see an empty activity with a title bar. You wrote in post #6 that you do see that.

    Maybe it will be best if you create a small project that demonstrates what you see and upload it.
     
  14. trueboss323

    trueboss323 Active Member Licensed User

    I found this old topic , that explains what I am talking about. Moreover what bluedude was saying that there is a delay between the time it takes for Activity Create / LoadLayout to be called. That thread is over 5 years now and I wonder if anything has changed, especially now that the emulators are faster , if we could still do anything about it ?
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    I'm sorry but as I tried 5 times to get a clear answer from you I cannot further help.

    You can use AppCompat to improve the behavior.

    Testing performance on the emulator is a mistake.
     
  16. Mashiane

    Mashiane Expert Licensed User

    Javier Campo Martinez likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice