本文介绍了Surfaceview和TextureView有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究Android,尤其是View系统.我之间有一个问题上的区别,但是没有我的母语的文档或参考文献.所以我想和你们知道.

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 know from you guys.

推荐答案

TextureView

TextureView可用于显示内容流.这样的内容流可以是例如视频或OpenGL场景.

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

示例:
https://github.com/dalinaum/TextureViewDemo

文档:
http://developer.android.com/reference/android/view/TextureView.html

SurfaceView

提供嵌入视图层次结构内部的专用绘图表面.

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

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

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

文档:
http://developer.android.com/reference/android/view/SurfaceView.html

这篇关于Surfaceview和TextureView有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 05:46