- Put your
SurfaceView
inside of aFrameLayout
orRelativeLayout
inyour layout XML file, since both ofthose allow stacking of widgets onthe Z-axis - Move your drawing logicinto a separate custom
View
class - Add an instance of the custom Viewclass to the layout XML file as achild of the
FrameLayout
orRelativeLayout
, but have it appearafter theSurfaceView
This will cause your custom View
class to appear to float above the SurfaceView
.