Package org.robolectric.shadows
Class ShadowSurfaceView.FakeSurfaceHolder
- java.lang.Object
-
- org.robolectric.shadows.ShadowSurfaceView.FakeSurfaceHolder
-
- All Implemented Interfaces:
SurfaceHolder
- Enclosing class:
- ShadowSurfaceView
public static class ShadowSurfaceView.FakeSurfaceHolder extends Object implements SurfaceHolder
Robolectric implementation ofSurfaceHolder
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.view.SurfaceHolder
SurfaceHolder.BadSurfaceTypeException, SurfaceHolder.Callback, SurfaceHolder.Callback2
-
-
Field Summary
-
Fields inherited from interface android.view.SurfaceHolder
SURFACE_TYPE_GPU, SURFACE_TYPE_HARDWARE, SURFACE_TYPE_NORMAL, SURFACE_TYPE_PUSH_BUFFERS
-
-
Constructor Summary
Constructors Constructor Description FakeSurfaceHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface android.view.SurfaceHolder
lockHardwareCanvas
-
-
-
-
Method Detail
-
addCallback
public void addCallback(SurfaceHolder.Callback callback)
- Specified by:
addCallback
in interfaceSurfaceHolder
-
getCallbacks
public Set<SurfaceHolder.Callback> getCallbacks()
-
removeCallback
public void removeCallback(SurfaceHolder.Callback callback)
- Specified by:
removeCallback
in interfaceSurfaceHolder
-
isCreating
public boolean isCreating()
- Specified by:
isCreating
in interfaceSurfaceHolder
-
setType
public void setType(int i)
- Specified by:
setType
in interfaceSurfaceHolder
-
setFixedSize
public void setFixedSize(int i, int i1)
- Specified by:
setFixedSize
in interfaceSurfaceHolder
-
setSizeFromLayout
public void setSizeFromLayout()
- Specified by:
setSizeFromLayout
in interfaceSurfaceHolder
-
setFormat
public void setFormat(int i)
- Specified by:
setFormat
in interfaceSurfaceHolder
-
setKeepScreenOn
public void setKeepScreenOn(boolean b)
- Specified by:
setKeepScreenOn
in interfaceSurfaceHolder
-
lockCanvas
public Canvas lockCanvas()
- Specified by:
lockCanvas
in interfaceSurfaceHolder
-
lockCanvas
public Canvas lockCanvas(Rect rect)
- Specified by:
lockCanvas
in interfaceSurfaceHolder
-
unlockCanvasAndPost
public void unlockCanvasAndPost(Canvas canvas)
- Specified by:
unlockCanvasAndPost
in interfaceSurfaceHolder
-
getSurfaceFrame
public Rect getSurfaceFrame()
- Specified by:
getSurfaceFrame
in interfaceSurfaceHolder
-
getSurface
public Surface getSurface()
- Specified by:
getSurface
in interfaceSurfaceHolder
-
-