harism / android-pagecurl

An example application for creating page curl/flip effect on Android using OpenGL ES.
Apache License 2.0
1.66k stars 610 forks source link

Left-to-right curl #36

Open tweetatoo opened 12 years ago

tweetatoo commented 12 years ago

Hello :)

Thank you very much for this great project :)

I noticed that this project supports right-to-left curl in order to bring up a new page, and left-to-right one when you want to navigate to the previous page.

I just wondered: can you please provide us with one of the opposite matter? I mean, to curl from left-to-right when navigating to a new page and from right-to-left when navigating to the previous page (exactly mirroring the current code).

Thank you :)

harism commented 12 years ago

I do have such code on my hard drive but haven't put it on GitHub. Could you send me email and I reply with modified classes. It's not 100% working version AFAIK but quite close I do hope.

tweetatoo commented 12 years ago

Thank you :) Please check your inbox. It is good also if you provide me with a code of how to make the mesh or the page filling the whole screen instead of keeping some spaces of blue areas around the margins of the page. Thank you again.

houplusplus commented 11 years ago

Hello,

Thank you very much Harism for your great work, and for sharing it. Can you please share the left to right part with me? I would be infinitely thankful

pks90 commented 11 years ago

@harism I have been struggling with this issue for last 1 week but couldn't resolve it , I also have created a thread for this http://stackoverflow.com/questions/16772734/curl-page-from-left-to-right-android on SO. Can you please point me here or just mail me the other code that would help me to go the previous pages with the right indexes.

harisqureshi commented 11 years ago

hi harism, need help regarding left to right page curl demo code, just like in arabic, it need it badly, i have tried a bit but i could't got what i want, so please help me, i need that code, to develop my app, pleaseee

harisqureshi commented 11 years ago

@harism as i asked you before i need your help to implement left to right curl, can you please send me what you have for left to right curl, i have sent you my id on your email, please reply me ASAP regards

sonywibisono commented 11 years ago

All of you is just for free consultation ... but for harism it is a lot of work he's done. For more another request, please donate or send some money to him to buy candy :) cheer...

qaziahmed commented 10 years ago

@harism can you please send me the modified classes to curl for arabic left to right. I am trying to make some arabic dua books. email is musab.ahmed@gmail.com

mmahamed commented 10 years ago

@harism Could you please send me left to right version of curl project to me. I've sent you an email. Thanks. My email is mmahamed@gmail.com

qdd188 commented 10 years ago

I think this can help you. https://github.com/harism/android_page_curl/issues/72

mmahamed commented 10 years ago

Unfortunately it does not work

mhd33pol commented 9 years ago

@harism Thank you very much for this great project. Could you send me the same code you have sent to @tweetatoo please? my email is: mhd33pol at yahoo.com

android85 commented 8 years ago

@harism , Could you send me the same code you have sent to @tweetatoo please? here is my email id- android.ramyadav@gmail.com

myeganeh2876 commented 7 years ago

anyone got the code for left to right page curl? if you do pleeeaaasssse send it to me mamady83@gmail.com

SardarKhan299 commented 7 years ago

can come one email me the project of left to right curl in android .. sardarkhan299@gmail.com

SardarKhan299 commented 7 years ago

@harism , Could you send me the same code you have sent to @tweetatoo please? here is my email id- sardarkhan299@gmail.com

SardarKhan299 commented 7 years ago

i am desperately waiting for code..thanks..for reply..

On Tue, Jan 24, 2017 at 10:56 PM, mamady83 notifications@github.com wrote:

@tweetatoo https://github.com/tweetatoo @SardarKhan299 https://github.com/SardarKhan299 @android85 https://github.com/android85 @mhd33pol https://github.com/mhd33pol @mmahamed https://github.com/mmahamed @qaziahmed https://github.com/qaziahmed @harisqureshi https://github.com/harisqureshi @pks90 https://github.com/pks90

https://www.dropbox.com/s/tiu8tqyh0491afq/ltr_android_page_curl.apk?dl=0

Left-to-Right Curl effect successfully implemented stay tuned for download link

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/harism/android_page_curl/issues/36#issuecomment-274883061, or mute the thread https://github.com/notifications/unsubscribe-auth/AOUTZ6iWiHtyQfQyB8ATqkdN77mQs6rvks5rVjtNgaJpZM4ALZVj .

as8703 commented 7 years ago

Sir please send me the from left to right my id is as8703@gmail.com

mujeebwazir commented 6 years ago

Send me the code of left to right curl
at my email : mujeebgull1234@gmail.com I will be thankful..

mujeebwazir commented 6 years ago

Thanks for your email.... it just works to move pages from left to right but its not working while curling the page from left to right.. whats i want is to curl the page also from left to right... you can see this app for understanding whats i mean and whats i want...

https://play.google.com/store/apps/details?id=com.fanzetech.quran

Please help me because i am going to make more apps for the company and all apps are related to your beautiful library.....

Waiting for your reply...

Thanks again

On Mon, Sep 17, 2018 at 10:38 AM charslan notifications@github.com wrote:

Modify line no. 211 in CurlRenderer.java Original:- pt.x = mViewRect.left + (mViewRect.width() * pt.x / mViewportWidth);

(Replace "left" with "right" and "+" with "-". Modified:- pt.x = mViewRect.right - (mViewRect.width() * pt.x / mViewportWidth);

It will work but the images will be flipped horizontally. It's not a big problem. You can flip the original images horizontally in any photo editor and use these flipped images for compiling. If left to right curl is not working then tell me I will help you. Because it's working in my phone. Note:- I'm not a software engineer🤔.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harism/android-pagecurl/issues/36#issuecomment-421894089, or mute the thread https://github.com/notifications/unsubscribe-auth/AhZ-c6YNxJ97Mnk-jQyWrUSa4ujZqCCEks5ubzU5gaJpZM4ALZVj .

charslan commented 6 years ago

Finally, Now we are able to curl the page from "left to right" without any problem. Modify Two files... 1) CurlRenderer 2) CurlMesh

Details: 1) In CurlRenderer modify two lines (142, 211)

For line 142:- Original: GLU.gluOrtho2D(gl, mViewRect.left, mViewRect.right,

Replace "left" with "right" and "right" with "left"

Modified: GLU.gluOrtho2D(gl, mViewRect.right, mViewRect.left,

For line no. 211:- Original: pt.x = mViewRect.left + (mViewRect.width() * pt.x / mViewportWidth);

(Replace "left" with "right" and "+" with "-".

Modified: pt.x = mViewRect.right - (mViewRect.width() * pt.x / mViewportWidth);

2) Now Modify CurlMesh(From line 862 to line 870)

Original Code: public void setRect(RectF r) { mRectangle[0].mPosX = r.left; mRectangle[0].mPosY = r.top; mRectangle[1].mPosX = r.left; mRectangle[1].mPosY = r.bottom; mRectangle[2].mPosX = r.right; mRectangle[2].mPosY = r.top; mRectangle[3].mPosX = r.right; mRectangle[3].mPosY = r.bottom; }

Modified Code:

public void setRect(RectF r) {
    mRectangle[2].mPosX = r.left;
    mRectangle[2].mPosY = r.top;
    mRectangle[3].mPosX = r.left;
    mRectangle[3].mPosY = r.bottom;
    mRectangle[0].mPosX = r.right;
    mRectangle[0].mPosY = r.top;
    mRectangle[1].mPosX = r.right;
    mRectangle[1].mPosY = r.bottom;
}

Note: I need help because I want to modify another app's file(CurlMesh.java) to get Left to right curl. I don't have any knowledge of programming. That's why I need help. The above modifications are result of my experiments on harism's code.

mujeebwazir commented 5 years ago

Thanks Charslan for your kind reply and attempt its works well now ... Thanks again.... Have a long and blessed life...

elhilia commented 5 years ago

Thanks very much charslan. You saved my time. Have a happy life.

kingdoom0 commented 3 years ago

how can i make it from right to left

charslan commented 3 years ago

Code given by harism is already for "Right to Left" curl.

On Sat, Jan 23, 2021, 10:47 PM kingdoom0 notifications@github.com wrote:

how can i make it from right to left

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harism/android-pagecurl/issues/36#issuecomment-766150036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKKSXER3JKL6EXLUHFZVEZDS3MDUHANCNFSM4ABNSVRQ .

kingdoom0 commented 3 years ago

@harism @charslan

no it is work on android from " left to right"

this code i have use in my project

https://github.com/huntto/Android-PageFlipOver

he is use harism source code

Alibaba786b commented 3 years ago

@harism @charslan

no it is work on android from " left to right"

this code i have use in my project

https://github.com/huntto/Android-PageFlipOver

he is use harism source code

@harism @charslan

no it is work on android from " left to right"

this code i have use in my project

https://github.com/huntto/Android-PageFlipOver

he is use harism source code

I have mentioned above how to change curl direction from "Right to Left" to "Left to Right".