What's differences between Surfaceview and TextureView?

后端 未结 4 1321
忘掉有多难
忘掉有多难 2020-12-23 13:58

I\'ve been studying Android especially View system. I have a question differences between them but there is no documents or references in my mother language. So I want to kn

4条回答
  •  隐瞒了意图╮
    2020-12-23 14:36

    TextureView

    A TextureView can be used to display a content stream. Such a content stream can for instance be a video or an OpenGL scene.

    Example :
    https://github.com/dalinaum/TextureViewDemo

    Document:
    http://developer.android.com/reference/android/view/TextureView.html

    SurfaceView

    Provides a dedicated drawing surface embedded inside of a view hierarchy.

    Examples :
    http://www.mindfiresolutions.com/Using-Surface-View-for-Android-1659.php
    http://blog.wisecells.com/2012/06/04/surface-view-android/

    Document:
    http://developer.android.com/reference/android/view/SurfaceView.html

提交回复
热议问题