How can I use Multiple GLSurfaceView components in the same Layout?

后端 未结 6 1822
挽巷
挽巷 2020-12-29 23:07

I\'m writing an Information Visualization API for Android and ran into a problem trying to place two units of a custom GLSurfaceView into a Layout. The Custom <

6条回答
  •  独厮守ぢ
    2020-12-29 23:57

    [UPDATE: This answer is no longer correct, as of Android 5.0 (Lollipop). See fadden's answer for a discussion, and links. It was also incorrect as of Android 2.0, and apparently was only an issue for OVERLAPPING surfaces even before then.]

    You cannot place 2 SurfaceViews(SV) into one Activity. For understand why you should know how SVs works.

    When you create it and place on activity it doesnt actually will be placed in activity (or top of it), instead it will be created behind of current activity with "transparent" view created in that activity.

    In Android 4.0 (API 14) there are new View called TextureView There are no way to create something like that View on older platforms.

提交回复
热议问题