Comments (9)
@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.
from android-pageflip.
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...
from android-pageflip.
@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:
- Draw normal text of one page on a bitmap, pass the bitmap to PageFlip to show.
- Intercept gesture before PageFlip handle them to turn page. For example: long click a word. you need to recognize the long click action and find out which word is chosen by (x, y) coordinate.
- Redraw the selected word with highlight style on a bitmap, normally, you need to redraw the whole page with the different style for choosing word. and then pass it to PageFlip to show it on screen.
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.
from android-pageflip.
I want to write text in every page. please guide how I put to each page the text
from android-pageflip.
@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...
from android-pageflip.
please help me.I want to write text in every page. please guide how I put to each page the text
from android-pageflip.
@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.
from android-pageflip.
@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. :)
from android-pageflip.
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.
from android-pageflip.
Related Issues (20)
- specific position
- How to add SupportMapFragment to Canvas HOT 1
- Modify current page./redraw current page. HOT 1
- How to maintain the sequence of the page flip. HOT 1
- Landscape View in Flip Page not working HOT 3
- 如何跳转到指定页 HOT 2
- Black screen in landscape view. Realme 5 phone android 9 HOT 3
- Any suggestions on how to handle front and back pages in doublePagesRender? HOT 3
- Dynamic bitmaps HOT 5
- Navigating to a specific page HOT 1
- Incorrect Page Number. HOT 2
- Landscape Mode Issue HOT 3
- There is a problem with page ranking HOT 2
- Help
- I
- Instead of Bitmaps, does it support custom layout or webview even? HOT 1
- Can we use it on PDF? HOT 8
- Could not find com.github.eschao:android-PageFlip:1.0.2. HOT 3
- 有双页翻页效果的电子书的例子吗
- 从第二页左下角翻回第一页没有效果
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-pageflip.