public static class ShadowSurfaceView.FakeSurfaceHolder extends Object implements SurfaceHolder
Robolectric implementation of SurfaceHolder
.
SurfaceHolder.BadSurfaceTypeException, SurfaceHolder.Callback, SurfaceHolder.Callback2
SURFACE_TYPE_GPU, SURFACE_TYPE_HARDWARE, SURFACE_TYPE_NORMAL, SURFACE_TYPE_PUSH_BUFFERS
Constructor and Description |
---|
FakeSurfaceHolder() |
Modifier and Type | Method and Description |
---|---|
void |
addCallback(SurfaceHolder.Callback callback) |
Set<SurfaceHolder.Callback> |
getCallbacks() |
Surface |
getSurface() |
Rect |
getSurfaceFrame() |
boolean |
isCreating() |
Canvas |
lockCanvas() |
Canvas |
lockCanvas(Rect rect) |
void |
removeCallback(SurfaceHolder.Callback callback) |
void |
setFixedSize(int i,
int i1) |
void |
setFormat(int i) |
void |
setKeepScreenOn(boolean b) |
void |
setSizeFromLayout() |
void |
setType(int i) |
void |
unlockCanvasAndPost(Canvas canvas) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lockHardwareCanvas
public void addCallback(SurfaceHolder.Callback callback)
addCallback
in interface SurfaceHolder
public Set<SurfaceHolder.Callback> getCallbacks()
public void removeCallback(SurfaceHolder.Callback callback)
removeCallback
in interface SurfaceHolder
public boolean isCreating()
isCreating
in interface SurfaceHolder
public void setType(int i)
setType
in interface SurfaceHolder
public void setFixedSize(int i, int i1)
setFixedSize
in interface SurfaceHolder
public void setSizeFromLayout()
setSizeFromLayout
in interface SurfaceHolder
public void setFormat(int i)
setFormat
in interface SurfaceHolder
public void setKeepScreenOn(boolean b)
setKeepScreenOn
in interface SurfaceHolder
public Canvas lockCanvas()
lockCanvas
in interface SurfaceHolder
public Canvas lockCanvas(Rect rect)
lockCanvas
in interface SurfaceHolder
public void unlockCanvasAndPost(Canvas canvas)
unlockCanvasAndPost
in interface SurfaceHolder
public Rect getSurfaceFrame()
getSurfaceFrame
in interface SurfaceHolder
public Surface getSurface()
getSurface
in interface SurfaceHolder