SurfaceHolder.Callback
Class Overview
A client may implement this interface to receive information about changes to the surface. When used with a SurfaceView
, the Surface being held is only available between calls to surfaceCreated(SurfaceHolder)
andsurfaceDestroyed(SurfaceHolder)
. The Callback is set with SurfaceHolder.addCallback
method.
Public Methods
public abstract void surfaceChanged (SurfaceHolder holder, int format, int width, int height)
This is called immediately after any structural changes (format or size) have been made to the surface. You should at this point update the imagery in the surface. This method is always called at least once, aftersurfaceCreated(SurfaceHolder)
.
Parameters
holder | The SurfaceHolder whose surface has changed. |
---|---|
format | The new PixelFormat of the surface. |
width | The new width of the surface. |
height | The new height of the surface. |
public abstract void surfaceCreated (SurfaceHolder holder)
This is called immediately after the surface is first created. Implementations of this should start up whatever rendering code they desire. Note that only one thread can ever draw into a Surface
, so you should not draw into the Surface here if your normal rendering will be in another thread.
Parameters
holder | The SurfaceHolder whose surface is being created. |
---|
public abstract void surfaceDestroyed (SurfaceHolder holder)
This is called immediately before a surface is being destroyed. After returning from this call, you should no longer try to access this surface. If you have a rendering thread that directly accesses the surface, you must ensure that thread is no longer touching the Surface before returning from this function.
Parameters
holder | The SurfaceHolder whose surface is being destroyed. |
---|
SurfaceHolder.Callback的更多相关文章
- Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系
转载请包含网址:http://blog.csdn.net/pathuang68/article/details/7351317 一.Surface Surface就是“表面”的意思.在SDK的文档中, ...
- Android图形系统之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的联系
1.Surface Surface extends Objectimplements Parcelable java.lang.Object ↳ android.view.Surface Cla ...
- Android图形系统之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback开发实例
原文:Android图形系统之Surface.SurfaceView.SurfaceHolder及SurfaceHolder.Callback之间的联系 Surface是原始图像缓冲区(raw buf ...
- Android 展示控件之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系
一.Surface Surface在SDK的文档中的描述是这样的:Handle onto a raw buffer that is being managed by the screen compos ...
- Android中的Surface, SurfaceHolder, SurfaceHolder.Callback, SurfaceView
传入一个surface,然后让openGL在surface上画图 window->view hierachy(DecorView是tree的root)->ViewRoot->Surf ...
- android大扫盲之SurfaceView,SurfaceHolder,SurfaceHolder.CallBack
最近接触到了SurfaceView,SurfaceHolder,SurfaceHolder.CallBack,一直不求其解,现在来粗浅认识一下它们. 先看一下官方的定义: 1.SurfaceView ...
- Android关于SurfaceView,SurfaceHolder,SurfaceHolder.CallBack详解
官方的定义: 1.SurfaceView SurfaceView是视图(View)的继承类,这个视图里内嵌了一个专门用于绘制的Surface.你可以控制这个Surface的格式和尺寸.Surfacev ...
- Surface与SurfaceView、SurfaceHolder
什么是Surface? android API的解释是:Handle onto a raw buffer that is being managed by the screen compositor ...
- 自己定义控件(2.2):SurfaceView和SurfaceHolder
本例需求及流程: Activity载入自己定义的SurfaceView-> SurfaceView 构造器中启动线程A.循环改变SurfaceView的x,y坐标,当x,y坐标到某点时设渐显标志 ...
随机推荐
- listview实现点击条目上的箭头展开隐藏菜单。
效果如下图,当点击listview中的小三角时,显示出下面布局,再点隐藏, 点击其他条目的三角时,上一个展开的条目隐藏的同时展开当前条目. 思路是在item布局中放入展开菜单的布局,并设置状态为隐藏, ...
- java 四舍五入 保留俩位小数
public static void main(String[] args) { String str="0"; BigDeci ...
- MySQL 及 SQL 注入
如果您通过网页获取用户输入的数据并将其插入一个MySQL数据库,那么就有可能发生SQL注入安全的问题. 本章节将为大家介绍如何防止SQL注入,并通过脚本来过滤SQL中注入的字符. 所谓SQL注入,就是 ...
- 在opencv中实现中文输出
http://pan.baidu.com/s/1hrQTWDe 已经成功 ; 来自为知笔记(Wiz)
- Poj(2784),二进制枚举最小生成树
题目链接:http://poj.org/problem?id=2784 Buy or Build Time Limit: 2000MS Memory Limit: 65536K Total Sub ...
- 第十四章:高级I/O
14.1:引言 本章内容包括非阻塞I/O.记录锁.系统V流机制.I/O多路转接(select和poll函数).readv和writev函数以及存储映射I/O(mmap),这些都称为高级I/O. 14. ...
- Mac环境下用Java(Sikuli+Robot)实现页游自动化
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ Sikulix(以前叫Sikuli)在Mac电脑的环境配置步骤如下: 1.从官网上下载Sikuli ...
- linux学习建议
给初学者的建议 注意事项: 1 严格区分大小写,包括命令和文件夹,windows和linux的系统不太一样 2 所有内容都是以文件保存,包括硬件,文件要永久生效,都要写入文件,所以文件命令很重要 3 ...
- 2016年11月15日 星期二 --出埃及记 Exodus 20:6
2016年11月15日 星期二 --出埃及记 Exodus 20:6 but showing love to a thousand of those who love me and keep my c ...
- linux 强大的编辑器之vi
vi编辑器是一个处理ASCII数据的文本工具.大多数linux发行版都已经默认安装了vi编辑器.vi是visual interface的缩写vim是 visual interface improved ...