cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: CB-12099 (android) SplashScreen Screen Flicker
Date Tue, 20 Dec 2016 21:37:33 GMT
Comments are inline

On Tue, Dec 20, 2016 at 1:19 PM, Sergey Shakhnazarov <daserge@apache.org>
wrote:
>
>
> > 3. I'm not sure why we need the prepare step and why the drawable's
> colour can't be changed programmatically in Java instead of pulling it from
> the config.xml in prepare.js, which isn't guaranteed to work in earlier
> versions of Cordova.
> Yes we can change the bg color programmatically but it will be too late as
> there will be a visible color change from initial color defined in layout.
>
>
Then we really shouldn't be adding this.  I don't think that this issue is
serious enough to warrant a major version change right now.  Perhaps if we
have a few major changes to the API that we want to make pending, we can
then revisit it.

I don't think it's possible to address "1." taking into account the flicker
> issue is reproducing even without the plugin added - there is a black
> screen before view is being filled with BackgroundColor.
>
> I think I've noticed another bug right now, which occurs when we have NO
> splashscreen plugin added - in this case there's a flash of BackgroundColor
> between app launch and webview showing.
>
>
That's the webview being too slow to render, and it's existed since the
project started.  Unfortunately that can't be fixed, but only mitigated by
using a Splashscreen and having an application that doesn't take all day to
render.  This is why the background color is a preference that you can set
in config.xml in the first place.

BTW: Every application starts out the same way on Android, and this is only
visible if there's something slowing down or blocking the application from
rendering (for example, when you debug the application, you will see a
black screen with the dialog saying that the debugger is connecting).  I
know that we do some hide/show magic with the WebView itself on the
Activity to try and prevent a white flash from appearing before the page is
rendered, so it's possible that the application is taking too long to draw
or the UI thread is blocked on something.  I've seen Unity applications
(OK, Just Pokemon Go, but there have to be others) crash and leave with
just a black screen, so this is not a problem unique to PhoneGap/Cordova.

Best regards,
> Sergey.
>
>
> On Sat, Dec 17, 2016 at 10:34 AM, Joe Bowser <bowserj@gmail.com> wrote:
>
> > OK, I read the PR, and I'll admit that I misunderstood part of the
> > problem.  I have a few concerns about this change:
> >
> > 1. Why does Android need to have a PR at all? The splashscreen plugin can
> > use edit-config tag to change the manifest to add the theme, which it
> > really should anyway and the XML files can be copied by the plugin.xml.
> > 2. The bug refers to the flicker, which I haven't seen in quite a while,
> > but can be attributed to the splashscreen disappearing at the wrong time
> > and the WebView not being made visible or not rendering properly.
> CB-12099
> > explicitly refers to the weird behaviour of the SplashScreenDelay not
> > actually being followed, which is why I made my initial comment. It's not
> > its own bug, but a part of CB-12099
> > 3. I'm not sure why we need the prepare step and why the drawable's
> colour
> > can't be changed programmatically in Java instead of pulling it from the
> > config.xml in prepare.js, which isn't guaranteed to work in earlier
> > versions of Cordova.
> >
> > I know this seems like more work, but I think it's possible to do this
> > without having to change the Plugin API for Splashscreen, also doing so
> > will also work on existing versions of Cordova, and this fix would
> probably
> > consist of a major version bump, because the new splashscreen wouldn't
> work
> > on the old versions of Cordova-Android.
> >
> > On Fri, Dec 16, 2016 at 10:34 PM, Sergey Shakhnazarov <
> daserge@apache.org>
> > wrote:
> >
> >> Hello Joe,
> >>
> >> Could you please elaborate - is there a Jira item corresponding to that
> >> duration issue?
> >>
> >> Thanks,
> >> Sergey.
> >>
> >> 16 Дек 2016 г. 23:38 пользователь "Joe Bowser" <bowserj@gmail.com>
> >> написал:
> >>
> >> I think we should figure out why the duration of the Splashscreen is
> >> messed
> >> up before we start messing with the background colour of the
> application,
> >> especially since the last time we did that, we broke Hello World!
> >>
> >> On Fri, Dec 16, 2016 at 11:32 AM, Sergey Shakhnazarov <
> daserge@apache.org
> >> >
> >> wrote:
> >>
> >> > Hi guys!
> >> >
> >> >
> >> >
> >> > There’s an issue with Android splashscreen that every app has a black
> >> flash
> >> > on start [1].
> >> >
> >> > I propose to fix this using the android:windowBackground composed as
> >> splash
> >> > image (which we use in splashscreen plugin) laid on top of
> >> > SplashScreenBackgroundColor
> >> > [2] (this preference is supported on Windows only as of now and will
> be
> >> > particularly useful for transparent images).
> >> >
> >> > I would appreciate any feedback on the proposal and prototype
> >> > implementation [3, 4].
> >> >
> >> >
> >> >
> >> > [1]: https://issues.apache.org/jira/browse/CB-12099
> >> >
> >> > [2]: https://cordova.apache.org/docs/en/dev/config_ref/index.html
> >> >
> >> > [3]: https://github.com/daserge/cordova-android/tree/CB-12099
> >> >
> >> > [4]: https://github.com/daserge/cordova-plugin-splashscreen/tree/
> >> CB-12099
> >> >
> >> >
> >> >
> >> > Please let me know if you have any questions or considerations.
> >> >
> >> >
> >> > Best regards,
> >> >
> >> > Sergey Shakhnazarov,
> >> >
> >> > Akvelon developer.
> >> >
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message