ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: White flash appearing when switching between tabs on Android

Open wonderdogone opened this issue 11 years ago • 121 comments

Type: bug

Platform: android 4.4 webview

when switching between tabs ONLY on Android platform, the app show a white flash. This is in 1.0.0 stable. Not using crosswalk. Forum post http://forum.ionicframework.com/t/white-flash-appearing-when-switching-between-tabs-on-android-in-1-0-0-stable/24774

wonderdogone avatar Jun 09 '15 08:06 wonderdogone

+1

tgensol avatar Mar 22 '16 20:03 tgensol

Looking into this tomorrow folks! :grin:

mhartington avatar Mar 22 '16 22:03 mhartington

There is a related issue with iOS that I will link here later tonight. I was able to repro it.

jgw96 avatar Mar 22 '16 23:03 jgw96

Thank you @mhartington!

ghost avatar Mar 23 '16 09:03 ghost

To add some more context, in my situation I found the bug to be present with the following:

Index.html <ion-nav-view></ion-nav-view>

view-1.html <ANY ELEMENT>Something</ANY ELEMENT><ion-nav-view></ion-nav-view>

sub-view-1.html <ANY></ANY>

But NOT present when I removed the <ANY ELEMENT> from view-1.html.

So it is, in my case, that I am unable to achieve the desired effect of showing a child-state inside of a parent state, without completely replacing the parent state content.

I tried ALL manner of ui-view/ion-view/ion-nav-view/ion-tabs/ion-pane/etc. Absolutely nothing worked.

joelbowen avatar Mar 23 '16 12:03 joelbowen

This issue is describing the same bug but on iOS https://github.com/driftyco/ionic/issues/5888

jgw96 avatar Mar 23 '16 14:03 jgw96

@mhartington can you test with the conference app? Me and @brandy were both able to repro some slight flash when switching through the tabs. This was using the emulator and not an actual device.

jgw96 avatar Mar 23 '16 14:03 jgw96

The bug in #5888 is for ionic2 though, I'm not sure the code bases are similar enough for it to be the same bug.

andreialecu avatar Mar 23 '16 14:03 andreialecu

hey yall, thanks for being patient on this one, really appreciate it :smile:

So looking over things, this should be effecting both iOS and Android with ionic 1.2.4, correct?

Also, has anyone been able to recreate this with the tabs starter app?

mhartington avatar Mar 23 '16 14:03 mhartington

@mhartington it's there in the tabs starter app, you just need to be very observant. Also, I fixed this in https://github.com/driftyco/ionic/pull/4654 but apparently that broke something else, and then when that got fixed, this was broken again.

You can see it in the video you posted: https://www.youtube.com/watch?v=_ja8a08iSPE&feature=youtu.be Just notice how instead of the new tab appearing, there's a very brief white flash (1 frame, it's very quick).

andreialecu avatar Mar 23 '16 14:03 andreialecu

@andreialecu alright, seeing it as well,

https://youtu.be/R5EafRKTst0

Same clip, just slowed down a lot

Looking at the PR, going to see what can be done and keep it from breaking other things :grin:

mhartington avatar Mar 23 '16 14:03 mhartington

Hey all! So I think I've been able to make some head way on this. I've opened a PR that looks good in my tests, but would love to hear some feedback from you first.

The changes have been made to viewFlicker branch

https://github.com/driftyco/ionic/pull/5937

If you wouldn't mind pulling down the code, building Ionic from source, and testing out the changes in your app, we can see if this fixes things and nip this bug :shipit:

mhartington avatar Mar 24 '16 17:03 mhartington

Awesome. Is this an android specific fox or will iOS also look better?

ctcampbell avatar Mar 24 '16 17:03 ctcampbell

@ctcampbell android ATM. In my tests, I wasn't able to cause a flicker on iOS

mhartington avatar Mar 24 '16 18:03 mhartington

Here's a quick video demoing the PR

https://youtu.be/nWSuocu64FU

mhartington avatar Mar 24 '16 18:03 mhartington

+1

jordantomax avatar Mar 24 '16 19:03 jordantomax

@jordantomax does this mean that the PR works well for you? :grin:

mhartington avatar Mar 24 '16 19:03 mhartington

Whoops, no sorry. Just subscribing to the feed. I can test it out though. Do I need to compile something in order to use, I see that the release wasn't touched by your commit.

jordantomax avatar Mar 24 '16 19:03 jordantomax

Ahh

You can follow these steps.

git clone https://github.com/driftyco/ionic.git
cd ionic 
git checkout viewFlicker
npm install
gulp build

And you should have the compiled code in dist/js/ionic.bundle.js You should be able to just copy/paste that code into a test project and try it out.

mhartington avatar Mar 24 '16 19:03 mhartington

Seems to be working well in the test tabs application. I'm still having problems with flashing in my app though. I'm using tabs and menu, but tabs only appear on certain pages. I want to take a video to show you, how do I go about doing that?

jordantomax avatar Mar 24 '16 20:03 jordantomax