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坐标到某点时设渐显标志 ...
随机推荐
- 使用 Filter 完成一个简单的权限模型
****对访问进行权限控制: 有权限则可以访问, 否则提示: 没有对应的权限, 请 返回其访问者的权限可以在manager那进行设置:
- 关于AnimationState的测试
修改time信息并不会立马生效,动画信息修改是在这一帧结束统一执行的. 当normalizedTime设置为0-1之外的值时,值并不会被约束回0-1范围,而动画会被约束播放到0-1之间的位置
- Js扩展方法ReplaceAll
String.prototype.replaceAll = function (reallyDo, replaceWith, ignoreCase) { if (!RegExp.prototype.i ...
- yum报错
用man clean all man yum,可以看到,clean选项的作用是: Is used to clean up various things which accumulate in th ...
- bootstrap ace MVC
<<html lang="en"><head> <meta charset="utf-8" /> <title& ...
- spring+mybatis事务管理
spring+mybatis事务管理 最近在和朋友做一个项目,考虑用springmvc+mybatis来做,之前在公司工作吧,对于数据库这块的配置也有人再弄,最近因为这个项目,我就上网学习了一些关于数 ...
- Listview的闪烁问题
在更新Listview数据时会出现闪烁,主要原因是没有开启双缓冲属性,在C#中可以通过重载Listview的方式开启,代码如下: using System.Windows.Forms; public ...
- C++实现链式栈,运用模板,界面友好,操作方便,运行流畅
//.h文件 #ifndef STACK_H #define STACK_H #include<iostream> #include<iomanip> using namesp ...
- java基础 (java工程师入门应该了解的)
1)建立Java开发环境 2)理解Java特性(features) 3)理解Java虚拟机软件的功能 4)描述垃圾回收概念 5)枚举实现Java代码安全方式 6)编码 编译 运行 JAav 应用程序 ...
- Cheatsheet: 2013 10.24 ~ 10.31
Web Performance Comparison Between Node.js and Java EE Other Hidden Productivity Secrets With Alfred ...