摘要: 错误日志:11-03 12:36:54.812: ERROR/AndroidRuntime(5084): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget内存溢出主要由以下几种情况引起:1.数据库的cursor没有关闭。2.构造adapter没有使用缓存contentview。3.调用registerReceiver后未调用unregisterReceiver()。4.未关闭InputStream/OutputStream。5.Bitmap使用后未调用recycle()。6.Context泄漏。7.Stat 阅读全文
posted @ 2012-02-07 10:25 OYK 阅读(1137) 评论(0) 推荐(0)
摘要: 本文参考:http://developer.android.com/guide/topics/resources/animation-resource.htmlhttp://developer.android.com/guide/topics/graphics/animation.html在Android中,Animation分为Tween Animation和Frame Animation两类。一、Tween Animation 对一张图片进行一系列的变换(包括缩放、透明度、移动、旋转)。对应的类是Animation; 资源访问方式: In Java:R.anim.filename... 阅读全文
posted @ 2012-02-07 10:15 OYK 阅读(562) 评论(0) 推荐(0)
摘要: 1、设置窗口格式为半透明getWindow().setFormat(PixelFormat.TRANSLUCENT);2、Android中在非UI线程里更新View的不同方法:* Activity.runOnUiThread( Runnable )* View.post( Runnable )* View.postDelayed( Runnable, long )* Hanlder3、全屏显示窗口requestWindowFeature(Window.FEATURE_NO_TITLE);getWindow().setFlags(WindowManager.LayoutParams.FLAG_F 阅读全文
posted @ 2012-02-07 10:00 OYK 阅读(490) 评论(0) 推荐(0)