SurfaceHolder.Callback2
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
SurfaceHolder.Callback2
implements
SurfaceHolder.Callback
android.view.SurfaceHolder.Callback2
|
Known indirect subclasses
GLSurfaceView |
An implementation of SurfaceView that uses the dedicated surface for
displaying OpenGL rendering.
|
NativeActivity |
Convenience for implementing an activity that will be implemented
purely in native code.
|
|
Additional callbacks that can be received for Callback
.
Summary
Public methods
surfaceRedrawNeededAsync
public void surfaceRedrawNeededAsync (SurfaceHolder holder,
Runnable drawingFinished)
An alternative to surfaceRedrawNeeded where it is not required to block
until the redraw is complete. You should initiate the redraw, and return,
later invoking drawingFinished when your redraw is complete.
This can be useful to avoid blocking your main application thread on rendering.
As of O, if this is implemented surfaceRedrawNeeded(SurfaceHolder)
will not be called.
However it is still recommended to implement surfaceRedrawNeeded(SurfaceHolder)
for
compatibility with older versions of the platform.
Parameters |
holder |
SurfaceHolder : The SurfaceHolder which needs redrawing.
This value cannot be null . |
drawingFinished |
Runnable : A runnable to signal completion. This may be invoked
from any thread.
This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]