Package org.robolectric.shadows
Class ShadowSurfaceView.FakeSurfaceHolder
java.lang.Object
org.robolectric.shadows.ShadowSurfaceView.FakeSurfaceHolder
- All Implemented Interfaces:
SurfaceHolder
- Enclosing class:
- ShadowSurfaceView
Robolectric implementation of
SurfaceHolder
.-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallback
(SurfaceHolder.Callback callback) int
Retrieve the requested format by the developers or by Android Frameworks internal logic.boolean
lockCanvas
(Rect rect) void
removeCallback
(SurfaceHolder.Callback callback) void
setFixedSize
(int i, int i1) void
setFormat
(int format) void
setKeepScreenOn
(boolean b) void
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
-
Constructor Details
-
FakeSurfaceHolder
public FakeSurfaceHolder()
-
-
Method Details
-
addCallback
- Specified by:
addCallback
in interfaceSurfaceHolder
-
getCallbacks
-
removeCallback
- 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 format) - Specified by:
setFormat
in interfaceSurfaceHolder
-
setKeepScreenOn
public void setKeepScreenOn(boolean b) - Specified by:
setKeepScreenOn
in interfaceSurfaceHolder
-
lockCanvas
- Specified by:
lockCanvas
in interfaceSurfaceHolder
-
lockCanvas
- Specified by:
lockCanvas
in interfaceSurfaceHolder
-
unlockCanvasAndPost
- Specified by:
unlockCanvasAndPost
in interfaceSurfaceHolder
-
getSurfaceFrame
- Specified by:
getSurfaceFrame
in interfaceSurfaceHolder
-
getSurface
- Specified by:
getSurface
in interfaceSurfaceHolder
-
getRequestedFormat
public int getRequestedFormat()Retrieve the requested format by the developers or by Android Frameworks internal logic.- Returns:
- The requested format, and the default value is
PixelFormat.RGB_565
. - See Also:
-