03 2013 档案
摘要:Texture :保存在GPU缓冲中的一张纹理。TextureRegion: 定义了一块矩形区域的纹理。主要作用是从一块纹理中择取需要使用的矩形区域。Sprite:Holds the geometry, color, and texture information for drawing 2D。这个类是继承于TextureRegion,是对TextureRegion的功能的扩展,相比增加了旋转,动画等效果。SpriteBatch:A SpriteBatch is used to draw 2D rectangles that reference a texture (region). 主要处理
阅读全文
摘要:Message:单个消息体,承载了两个线程之间交流的信息。不同的消息由"what"来区分。MessageQueue:消息链表,所有从非UI线程发过来的Message都被加入到这个队列中。其实这个类主要功能就是往mMessage的next加入新的消息,然后提供给Looper获取。Handler:在非主线程中发送消息,并且在主线程中处理消息。(自己发送给自己,好变态。)Looper: 遍历MessageQueue中所有没有处理过的消息,发送给Handler处理。Thread:非主线程。上面所有的东西都是为了该线程和主线程交互数据(比如View)做准备的。总体流程如下: 1 UI
阅读全文
摘要:ApplicationInfo:Information you can retrieve about a particular application. Thiscorresponds to information collected from the AndroidManifest.xml'sapplication 根据AndroidManifest.xml文件中的标签“application” 检索到特定的应用,包含activity,broadcast,service,provider。ResolveInfo: Information that is returne...
阅读全文
摘要:View:对于绘画来说,最重要的步骤是重载 onDraw方法并且修改画布Canvas。SurfaceView:1,You can control the format of this surface and, if you like, its size; 2,One of the purposes of this class is to provide a surface in which a secondary thread can render into the screen.SurfaceView 和 View 的主要区别:1,SurfaceView 可以在主线程和非主...
阅读全文
摘要:1 public class MiniLauncher extends AndroidApplication implements MenuActionListener { 2 3 public View glView =null; 4 public DesktopListener mListener; 5 @Override 6 public void onCreate(Bundle savedInstanceState) { 7 8 //得到的是一个surfaceView 9 glView = initialize...
阅读全文
摘要:public class MainActivity extends Activity { private Bitmap mWallpaper; private TextView tv=null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv=(TextView)this.findViewById(R.i...
阅读全文

浙公网安备 33010602011771号