eschao / android-PageFlip

3D Style Page Flip on Android
Apache License 2.0
1.74k stars 262 forks source link

Update firstTexture #32

Closed jasolgar84 closed 6 years ago

jasolgar84 commented 6 years ago

Is threre any way to update firstTexture if it is already set and pafeFlip is doesn't done yet?

I try with getFirstPage().deleteAllTextures(); but it produces memory leak and after many pafeFlip memory app increase a lot.

eschao commented 6 years ago

I think you can try

page.setFirstTexture(mBitmap);

It will set the first texture with given bitmap. If the page is not flipping, you can call PageFlip.drawPageFrame(); to update screen after you set the first texture.

But if the page is flipping, I don't recommend to update it randomly, please refer to Sample project to know how to update texture in single and double page modes

jasolgar84 commented 6 years ago

Yes, that is what I have done. But, if I set First Texture before, I can't update it with a different bitmap again by that way. So, when flip starts, it shows the first image instead of the second one.