android中SurfaceView SurfaceHolder SurfaceHolder.Callback 关系 理解
(看了下1.5的平台的源代码,实话说不是很懂!汗颜。暂且随便记录下,以后再回头理解)
SurfaceView的解释:
Provides a dedicated drawing surface embedded inside of a view hierarchy。
Access to the underlying surface is provided via the SurfaceHolder interface, which can be retrieved by calling getHolder().
此类提供了函数:getHolder()返回一个SurfaceHolder对象,用于控制surface.
SurfaceHolder的解释:
Abstract interface to someone holding a display surface. Allows you to control the surface size and format, edit the pixels in the surface, and monitor changes to the surface
即:它是一个用于控制surface的接口,它提供了控制surface 的大小,格式,上面的像素,即监视其改变的。
SurfaceHolder.Callback的解释:
A client may implement this interface to receive information about changes to the surface。
实现此接口的类,必须实现这几个函数:surfaceChanged()、surfaceCreated()、surfaceDestroyed()。这几个函数,会在相应的事件发生后,并调用,即surfaceview的函数会被调用。
http://apps.hi.baidu.com/share/detail/32312551
更多相关文章
- C语言函数的递归(上)
- 第十一篇 ANDROID 系统网络连接和管理机制
- Android(安卓)4.0.1_r1源代码发布,更新获取方法
- Android4.4以太网移植问题
- Android(安卓)8/9高通平台客制化虚拟导航按键隐藏
- Android(安卓)Binder 修炼之道(四)Binder 系统C++ 发送数据过程以
- android 动态改变图片大小
- android中如何发送一个广播
- Android(安卓)Audio 数据流详解