android-flip icon indicating copy to clipboard operation
android-flip copied to clipboard

Layout White Flashes

Open Kanval87 opened this issue 12 years ago • 51 comments

When layouts are heavy ( have a multiple child's and child's of child), flip view tend to give white flashes while flipping.

Kanval87 avatar Jan 30 '13 09:01 Kanval87

I was lazy and used a naive mechanism to start animation in showFlipAnimation() of FlipViewController. https://github.com/openaphid/android-flip/blob/master/FlipView/FlipLibrary/src/com/aphidmobile/flip/FlipViewController.java#L497

Flickers happen when 100ms is not enough for the controller to build animations.

I will try to solve it as it seems like a simple fix.

openaphid avatar Jan 31 '13 02:01 openaphid

Thank you for your instant consideration of issue.

i must say animation looks beautiful and works effiently .

Kanval87 avatar Jan 31 '13 05:01 Kanval87

I've pushed a change in develop branch. I won't claim it can eliminate flicker entirely, but please let me know if it helps reduce flashing in your app.

openaphid avatar Jan 31 '13 06:01 openaphid

This is what i'm seeing:

when the page is refreshed (the screenshot) after i flipped to it (after my lazy content is loaded), it will flicker when i flip it over to the next page. When the page has already done it's refresh at the moment i flipped over to it, it will not flicker when i flip to the next.

quintos avatar Feb 05 '13 19:02 quintos

Sorry it took mi long to reply

and no problem has'nt been solved yet.. it is still flashing

Kanval87 avatar Feb 07 '13 10:02 Kanval87

Please suggest some ideas to reduce flashing?

ajitjangra avatar Apr 24 '13 07:04 ajitjangra

Reopened, will push a fix in develop branch soon

openaphid avatar Apr 28 '13 01:04 openaphid

The push 2dca94e should have fix the flash issue, but it also introduces a minor issue when flip backward on the first page. I'll publish a fix later today.

openaphid avatar Apr 28 '13 01:04 openaphid

Hello, thank you for your fix, but I found [FlipView Demo] -> [3.Async Content] is always some white splash screen.when flipping next page no problem, but often occur flipping to pre page by gently touch.

greathemin avatar Apr 30 '13 16:04 greathemin

Thanks for your report, it seems my previous fix is not perfect yet.

openaphid avatar May 01 '13 02:05 openaphid

I've finished another fix in the develop branch to address the issue. Please try it on your device. Thanks in advance.

openaphid avatar May 01 '13 06:05 openaphid

Thanks ! Flip animation more smooth now.

redwind avatar May 03 '13 09:05 redwind

I am getting White Flash on Layout while flipping next. Flip back is working fine but next has issue.

miteshm avatar Dec 04 '13 13:12 miteshm

I am also getting the same White Flash when flipping next.But flipping to last page is fine,I am curious about this issue.Hope to fix it.

JackCho avatar Dec 10 '13 05:12 JackCho

I also facing this problem now. I user gridview and setAdapter for gridview in getView method Please fix it. Thanks in advances!

manhhoangxuan avatar Dec 11 '13 07:12 manhhoangxuan

Hhihi I was fixed my problem. The reason of problem that I don't set background for main layout. When I set background by tag android:background="@android:color/white" > it's OK. So I think that, this problem still encounter if background is transparent Thank you for sharing a great lib. Thanks in Advances!

manhhoangxuan avatar Dec 11 '13 07:12 manhhoangxuan

I have the same issue... Flipping next is flashing, but flipping back is working just fine. @miteshm and @JackCho did you guys find a fix for that? @openaphid do you plan to reopen this bug, by any chance? Cheers!

kevinmeresse avatar Dec 12 '13 22:12 kevinmeresse

I have the same issue...In FragementActivity, Flipping next is flashing, but flipping back is working just fine . Although everything works fine in Activity but in Fragment Activity Its flashing in forwarding.

gauravdegenius avatar Dec 18 '13 12:12 gauravdegenius

@kevinmeresse Did you get any fix for the same ?

gauravdegenius avatar Dec 18 '13 13:12 gauravdegenius

I got the RCA for the same, flickering still happening until android:targetSdkVersion is greater than 10. So, For ICS and on words It flickers in next flipping.

gauravdegenius avatar Dec 20 '13 06:12 gauravdegenius

Thanks,I also have the same problem. white flashes while flipping,In my App,the imageview is too heavy.

fanhongwei avatar Dec 26 '13 03:12 fanhongwei

You can reduce the white flash by reduce rendering bitmap

setAnimationBitmapFormat(Bitmap.Config);

This doesn't kill all the flashes but hope it helps! :)

indy1515 avatar Jan 20 '14 18:01 indy1515

Still having a problem with a blinking at random times ... Has anyone found a clear solution to this?

ngoumotsios avatar Jan 22 '14 00:01 ngoumotsios

Please what about the flickering when getting to next page I hope U solve this issue :(

Thanks in advance

hak-ziadov avatar Feb 16 '14 09:02 hak-ziadov

Unfortunatelly i have not solve this issue ... i am trying to get deep into code but is dificult ... Do you have the same problem?

ngoumotsios avatar Feb 16 '14 09:02 ngoumotsios

unfortunatelly yes :(

hak-ziadov avatar Feb 16 '14 10:02 hak-ziadov

I have same problem now. I am using Galaxy S3 for testing this but when i flip next, flash screen still happen I was use lastest version and change setAnimationBitmapFormat(Bitmap.Config.RGB_565) but it's not working Any body solved problem? Thanks in advances!

manhhoangxuan avatar Feb 21 '14 07:02 manhhoangxuan

Hi guys, I couldn't get any fix for the white flashes. But I am now using another library from @emilsjolander which is working very well: https://github.com/emilsjolander/android-FlipView It doesn't support webviews or fragments yet, but it's clean and easy to use. I hope it can help some of you who can't get this one work properly. Cheers!

kevinmeresse avatar Feb 28 '14 00:02 kevinmeresse

I will still wait @openaphid to fix for the white flashes.I believe there not be long time. if there be long time,I will try @emilsjolander. @kevinmeresse ,thank you!

fanhongwei avatar Feb 28 '14 00:02 fanhongwei

Hi all, I fixed this issue by putting an ImageView with white background at the bottom of my page view layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:background="#ffffff"/>
    <LinearLayout
        android:id="@+id/content_container"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:orientation="vertical">

        <!-- Your page content goes here -->

    </LinearLayout>

</RelativeLayout>

Hope this can help ppl looking for solutions around this

zhuofengli avatar Mar 19 '14 11:03 zhuofengli