Closed acuna-public closed 6 years ago
@acuna-pro No, you can't use TextView on it since pageflip only accepts a bitmap as a screen content to show. I'm not sure why you need that. Suppose you want to implement a pageflip animation when swap two views. I think android animation library should be responsible for it, but unfortunately, pageflip doesn't support android animation layer.
Because I'm looking for the way to implement the text hightlight in books (e. g. like in learning manuals and synopsis). Any known bookreaders like MoonReader, eReader, etc have similar page flips, but with normal text which can be highlighted. Seems that they've found the way to implement it, and not so known readers are too, so seems that it's really, but don't know how...
@acuna-pro Firstly, you need to understand the principle of the PageFlip lib. It is just aimed to implement a 3D style flipping effect with OpenGL. This is only what it is responsible for. Except that, all the functions what you need should be implemented by yourself or other 3rd library. Given that your requirement, I think you can follow the below steps to reach:
As you see in the above steps, you have to be responsible for drawing text with different style. The PageFlip only help you to show a prepared bitmap on screen and play a flip animation when trigger a page turning. Hope my answer can help address your problem.
I want to write text in every page. please guide how I put to each page the text
@eschao Wow, thanks a lot for your adviсes. Seems that I need to implement it by myself... But I still can't believe that all not most known readers have this implemented yet but there's no any open-source libraries for this...
please help me.I want to write text in every page. please guide how I put to each page the text
@mahdimzf2015 What is your problem? You can find the "First page" text in the code and edit it for your purposes, but it will be an image only, but with text.
@acuna-pro I created a reader application on Android before(not open source project), that's why I know this responsibility is not in PageFlip's scope and that is also why I created PageFlip library. :)
Ah, wait, I don't understand you) You've created a reader which is supported the plain text, but created a PageFlip in open-source which do not? Can't imagine where it can be useful to use images instead of plain text) But after that, I have some thoughts about its implementation (but now I making another project), but how do you think, can I put it to open-source afterwards? There's some... some... ethic moment in this all :/ Thanks.
I need to implement the text highlight on pages to copy it (for example). I'm clicking on text (eg "First page" which is default) and hold it, but have no action. Is it really to use a TextView rather than Bitmap or I missing something?