Code Monkey home page Code Monkey logo

Comments (51)

magirtopcu avatar magirtopcu commented on June 14, 2024 1

I changed the postHideFlipAnimation like below in FlipViewController.

void postHideFlipAnimation() {
    if (inFlipAnimation) {
      handler.postDelayed(new Runnable() {
        @Override
        public void run() {
          hideFlipAnimation();
        }
      },200);
    }
  }

from android-flip.

 avatar commented on June 14, 2024 1

Hey. How can I change your code according to read images from URL or drawable ?

from android-flip.

srpunni avatar srpunni commented on June 14, 2024 1

Comment a line as below in FlipViewController...it will work like a charm....also keep main layout background white...also imageview background white color:
private void hideFlipAnimation() {
if (inFlipAnimation) {
inFlipAnimation = false;

  updateVisibleView(bufferIndex);

  if (onViewFlipListener != null) {
    onViewFlipListener.onViewFlipped(bufferedViews.get(bufferIndex), adapterIndex);
  }

  handler.post(new Runnable() {
    public void run() {
      if (!inFlipAnimation) {
        //COMMENT BELOW LINE
       // cards.setVisible(false);
        surfaceView.requestRender(); //ask OpenGL to clear its display
      }
    }
  });
}

}

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

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.

from android-flip.

Kanval87 avatar Kanval87 commented on June 14, 2024

Thank you for your instant consideration of issue.

i must say animation looks beautiful and works effiently .

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

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.

from android-flip.

quintos avatar quintos commented on June 14, 2024

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.

from android-flip.

Kanval87 avatar Kanval87 commented on June 14, 2024

Sorry it took mi long to reply

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

from android-flip.

ajitjangra avatar ajitjangra commented on June 14, 2024

Please suggest some ideas to reduce flashing?

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

Reopened, will push a fix in develop branch soon

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

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.

from android-flip.

greathemin avatar greathemin commented on June 14, 2024

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.

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

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

from android-flip.

openaphid avatar openaphid commented on June 14, 2024

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

from android-flip.

redwind avatar redwind commented on June 14, 2024

Thanks !
Flip animation more smooth now.

from android-flip.

miteshm avatar miteshm commented on June 14, 2024

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

from android-flip.

JackCho avatar JackCho commented on June 14, 2024

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.

from android-flip.

manhhoangxuan avatar manhhoangxuan commented on June 14, 2024

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

from android-flip.

manhhoangxuan avatar manhhoangxuan commented on June 14, 2024

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!

from android-flip.

kevinmeresse avatar kevinmeresse commented on June 14, 2024

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!

from android-flip.

gauravdegenius avatar gauravdegenius commented on June 14, 2024

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.

from android-flip.

gauravdegenius avatar gauravdegenius commented on June 14, 2024

@kevinmeresse Did you get any fix for the same ?

from android-flip.

gauravdegenius avatar gauravdegenius commented on June 14, 2024

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.

from android-flip.

fanhongwei avatar fanhongwei commented on June 14, 2024

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

from android-flip.

indy1515 avatar indy1515 commented on June 14, 2024

You can reduce the white flash by reduce rendering bitmap

setAnimationBitmapFormat(Bitmap.Config);

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

from android-flip.

ngoumotsios avatar ngoumotsios commented on June 14, 2024

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

from android-flip.

hak-ziadov avatar hak-ziadov commented on June 14, 2024

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

Thanks in advance

from android-flip.

ngoumotsios avatar ngoumotsios commented on June 14, 2024

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

from android-flip.

hak-ziadov avatar hak-ziadov commented on June 14, 2024

unfortunatelly yes :(

from android-flip.

manhhoangxuan avatar manhhoangxuan commented on June 14, 2024

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!

from android-flip.

kevinmeresse avatar kevinmeresse commented on June 14, 2024

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!

from android-flip.

fanhongwei avatar fanhongwei commented on June 14, 2024

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!

from android-flip.

zhuofengli avatar zhuofengli commented on June 14, 2024

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

from android-flip.

fanhongwei avatar fanhongwei commented on June 14, 2024

I have a try,it still flash screen,but the probality is lower

from android-flip.

2laa avatar 2laa commented on June 14, 2024

Hi All, Has anyone found a solution?

from android-flip.

 avatar commented on June 14, 2024

FlipViewController.java
void postHideFlipAnimation() {
if (inFlipAnimation) {
// handler.post(new Runnable() {
// @OverRide
// public void run() {
// hideFlipAnimation();
// }
// });
}
}

try

from android-flip.

manhhoangxuan avatar manhhoangxuan commented on June 14, 2024

@link17: yeah, comment this lines, flash will stop but not update the view.
Could you give full solution for this
thanks in advance!

from android-flip.

soualid avatar soualid commented on June 14, 2024

Having the same issue. The worst is that everything was OK when I was evaluating this library during my POC, and I forked it to add features to it (spine position, orientation change handling).

Does anybody found a solution to fix this ?

from android-flip.

soualid avatar soualid commented on June 14, 2024

Probably not the cleanest solution, but found that the flicker does not appear if you delay the call to hideFlipAnimation in the postHideFlipAnimation() method of FlipViewController.java.

    void postHideFlipAnimation() {
        if (inFlipAnimation) {
            new Thread() {
                @Override
                public void run() {
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                    }
                    ((Activity)FlipViewController.this.getContext()).runOnUiThread(new Runnable() {
                        public void run() {
                            handler.post(new Runnable() {
                                public void run() {
                                    hideFlipAnimation();
                                }
                            });
                        }
                    });
                }
            }.start();
        }
    }

from android-flip.

zhuofengli avatar zhuofengli commented on June 14, 2024

hmmm, I tried the solution above, but the flickering still happens

from android-flip.

vishnumg avatar vishnumg commented on June 14, 2024

I had a similar problem. The content of the flipview had margins around them. While flipping, the margins started showing up in white. Once the animations are complete, it goes back to normal. The white margin shows up only during the flipping.

How I solved this:
I wapped the contents int another layout and applied padding to it the same amount of margin the contents used to have. This fixed the problem.

from android-flip.

Kirthiga30 avatar Kirthiga30 commented on June 14, 2024

Flicker issue has been fixed.Delay the postHideFlipAnimation for 2 seconds and add a transparent background in parent layout.

from android-flip.

sahib20 avatar sahib20 commented on June 14, 2024

in flipviewcontroller where to call webservice when i flip the page and data is loaded dynamically when flip page.

from android-flip.

srinivas460 avatar srinivas460 commented on June 14, 2024

Hi , faceing the same issue also when i try to flip the layout image gets refreshed and later flipping . when i return to image positon layer , image is not getting refreshed again , so only when i flip for next view only image gets refreshing .
so can anyone tell me how to fix it ....

from android-flip.

runforprogram avatar runforprogram commented on June 14, 2024

I used @magirtopcu method,the flicker disappear,but i feel like switch is slow,and I implement FlipViewController.ViewFlipListener(),the method onViewFlipped is delayed. I don't think it is a perfect
solution.

from android-flip.

magirtopcu avatar magirtopcu commented on June 14, 2024

Hi @runforprogram , Can you share your implementation ?

from android-flip.

 avatar commented on June 14, 2024

Anybody found a solution yet?

from android-flip.

biechereran avatar biechereran commented on June 14, 2024

Who has a good solution for this issue?
Help anyone?

from android-flip.

Pkaran01 avatar Pkaran01 commented on June 14, 2024

.it's work like a charm but image is not updating properly

from android-flip.

weepctxb avatar weepctxb commented on June 14, 2024

@CRUDTechnolgoy Me too, I tried to hide that line but that causes my search filter on the FlipView to not work. Delaying by 200ms and setting the container layout backgrounds to white seems to be the best fix for now.

from android-flip.

praveenrawat89 avatar praveenrawat89 commented on June 14, 2024

hi , Firstly , Very Nice library . Can anyone tell me , how to implement zoom in , zoom out and pinch functionality . I used with custom zoomview but it will intrupt the sliding .

from android-flip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.