Gallery 3D 分析 文章分类:移动开发 Gallery 3D 分析 1
Lay er 是个抽象类
有 5 个变量,分别是mX;mY(位置坐标);mWidth;mHeight(宽与高);mHidden (是否隐藏); 一个抽象方法,非抽象子类都有实现
Java 代码 1
public abstract void generate(RenderView view, RenderView
Lists lists); 其他的可以在子类中重写 Java 代码 1
// Returns true if something is animating
public boolean update(RenderView view, float frameInterval) { 3
return false; 4
public void renderOpaque(RenderView view, GL11 gl) { 7
public void renderBlended(RenderView view, GL11 gl) { 10
public boolean onTouchEvent(MotionEvent event) { 13
return false; 14
// Allows subclasses to further constrain the hit test defined by layer 17
// bounds
public boolean containsPoint(float x, float y) { 19
return true; 20
protected void onSurfaceCreated(RenderView