Configuration reference
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Every property and method below exists with the same name and default in CurlTextureView and CurlGLSurfaceView.
Defaults are the constants of the view’s companion object.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
|
|
|
Provides page count and content. Setting it resets |
|
|
|
Index of the page shown on the right side. Change it with |
|
|
|
|
|
|
|
|
|
|
|
Whether the left page is drawn. |
|
|
|
Whether the last page can be flipped. |
|
|
|
Duration of the animation that completes or reverts a flip when the finger is raised. Must be |
|
|
|
Duration of the flip animated by |
|
|
|
Uses touch pressure to change the curl radius. Experimental. |
|
|
|
Notified on the main thread when the visible page changes. |
|
|
|
Notified when the view is tapped. |
|
|
|
Notified from |
Mesh properties
These can only be set while pageProvider is null; otherwise they throw IllegalArgumentException.
| Property | Type | Default | Description |
|---|---|---|---|
|
|
|
Maximum number of splits of the curl. Larger is smoother, with more polygons. |
|
|
|
Draws drop and self shadows. |
|
|
|
RGBA color where the shadow starts. 4 values in |
|
|
|
RGBA color where the shadow ends. 4 values in |
|
|
|
Brightness of the texture close to the curl, in |
|
|
|
Draws page textures. |
|
|
|
Development aid: draws polygon outlines. |
|
|
|
Development aid: draws the curl position and direction. |
Methods
| Method | Description |
|---|---|
|
Shows the page immediately. The index is clamped to the available pages. |
|
Animates a page flip that lands on the page. The index is clamped to the available pages. |
|
Margins around the pages, in pixels. |
|
Margins as fractions of the view width (left, right) and height (top, bottom). |
|
OpenGL clear color ( |
|
Resume and pause the rendering thread. Forward them from the activity or fragment. |
CurlPage
| Member | Description |
|---|---|
|
Sets the bitmap of |
|
Sets the blend color of a side. White by default. |
|
Returns the blend color of a side. |
|
Whether the back side has a texture different from the front side. |
|
Restore the initial state / recycle the textures. Called by the view before each |