SurfaceView probably does not work like a regular View in this regard.
Instead, do the following:
- Put your
SurfaceViewinside of a
FrameLayoutorRelativeLayoutin
your layout XML file, since both of
those allow stacking of widgets on
the Z-axis - Move your drawing logic
into a separate customViewclass - Add an instance of the custom View
class to the layout XML file as a
child of theFrameLayoutor
RelativeLayout, but have it appear
after theSurfaceView
This will cause your custom View class to appear to float above the SurfaceView.