public interface ViewHolder
| 限定符和类型 | 接口 | 说明 |
|---|---|---|
static interface |
ViewHolder.BitmapListener |
Provides the listener for events of obtaining component contents in the form of bitmap.
|
static interface |
ViewHolder.SurfaceListener |
Provides the listener for surface events.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
TargetBuffer |
getTargetBuffer() |
Obtains the
TargetBuffer that can be used to draw content on the component held by a ViewHolder. |
Component |
getView() |
Obtains a component connected to the component holder.
|
void |
release() |
Releases the surface held by a
ViewHolder. |
void |
setOpaque(boolean isOpaque) |
Sets whether the surface is opaque.
|
void |
setSurfaceListener(ViewHolder.SurfaceListener listener) |
Sets a surface listener used to track lifetime events of the surface.
|
void setSurfaceListener(ViewHolder.SurfaceListener listener)
listener - Indicates the listener to set.Component getView()
void release()
ViewHolder.TargetBuffer getTargetBuffer()
TargetBuffer that can be used to draw content on the component held by a ViewHolder.
If TargetBuffer is used as the drawing target of an engine, the ViewHolder should be
passed to the engine. For details, see Engine#setDefaultTargetBuffer(TargetBuffer).
void setOpaque(boolean isOpaque)
isOpaque - Indicates whether the surface is opaque. true indicates that the surface is opaque.