Handling two surfaceViews

后端 未结 2 948
盖世英雄少女心
盖世英雄少女心 2021-01-06 15:26

I have two surface Views 1> MediaRecorder display surfaceview. 2> MediaPlayer SurfaceView displaying the Media recorded by MediaRecorder.

I want to display both the

相关标签:
2条回答
  • 2021-01-06 15:58

    I want to display both the views simultaneously on the screen z ordered.

    AFAIK, that is not supported by Android. Android cannot composite multiple SurfaceViews. It can handle a regular View (e.g., Button) on top of a SurfaceView, but not two SurfaceViews Z ordered.

    I recommend redesigning your application to have a single SurfaceView at a time.

    0 讨论(0)
  • 2021-01-06 16:04

    As of Android 2 (API level 5) having 2 surfaceviews is supported. You can set the zOrder of the 2 surface views using setZOrderMediaOverlay although apparently it breaks the intended semantics of SurfaceView.

    0 讨论(0)
提交回复
热议问题