lulinan

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年8月17日

摘要: Fragment的生命周期 阅读全文
posted @ 2013-08-17 16:41 lulinan 阅读(109) 评论(0) 推荐(0)

2013年8月3日

摘要: AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.AsyncTask是一个异步执行任务。AsyncTask is designed to be a helper class aroundThreadandHandlerand does not consti 阅读全文
posted @ 2013-08-03 16:56 lulinan 阅读(132) 评论(0) 推荐(0)

摘要: universal-image-loader使用总结待补充 阅读全文
posted @ 2013-08-03 16:55 lulinan 阅读(146) 评论(0) 推荐(0)

摘要: 一个可重入的互斥锁定Lock,它具有与使用synchronized方法和语句所访问的隐式监视器锁定相同的一些基本行为和语义,但功能更强大。ReentrantLock将由最近成功获得锁定,并且还没有释放该锁定的线程所拥有。当锁定没有被另一个线程所拥有时,调用lock()的线程将成功获取该锁定并返回。如果当前线程已经拥有该锁定,此方法将立即返回。可以使用isHeldByCurrentThread()和getHoldCount()方法来检查此情况是否发生。lock()方法如下执行:如果该锁定没有被另一个线程保持,则获取该锁定并立即返回,将锁定的保持计数设置为1。如果当前线程已经保持该锁定,则将保持计 阅读全文
posted @ 2013-08-03 16:52 lulinan 阅读(292) 评论(0) 推荐(0)

2013年7月11日

摘要: 1 /** 2 * Sudoku 3 * @author Victor 4 * @date 2013-7-10 上午8:47:44 5 */ 6 public class Sudoku { 7 8 public static void main(String[] args) { 9 // TODO Auto-generated method stub 10 String input = "....3..9....2....1.5.9..............1.2.8.4.6.8.5...2..75......4.... 阅读全文
posted @ 2013-07-11 21:03 lulinan 阅读(509) 评论(0) 推荐(0)

2013年7月6日

摘要: activity状态的保存和保持(onRetainNonConfigurationInstance和getLastNonConfigurationInstance) 阅读全文
posted @ 2013-07-06 12:58 lulinan 阅读(238) 评论(0) 推荐(0)

摘要: This Handler class should be static or leaks might occur. 大概意思是:Handler类应该定义成静态类,否则可能导致内存泄露。查询资料,比较统一的解决方法如下所示:Handler objects for the same thread all share a common Looper object, which they post messages to and read from.As messages contain targetHandler, as long as there are messages with target 阅读全文
posted @ 2013-07-06 12:44 lulinan 阅读(382) 评论(0) 推荐(0)

摘要: SectionIndexer用法 阅读全文
posted @ 2013-07-06 10:22 lulinan 阅读(216) 评论(0) 推荐(0)

2013年7月5日

摘要: 值对象和引用对象 阅读全文
posted @ 2013-07-05 23:56 lulinan 阅读(232) 评论(0) 推荐(0)

摘要: SparseArray的作用和HashMap类似,是一组key-value对,不过SparseArray比HashMap更高效。相比数组,SparseArray可以对内容按索引排列。SparseArray保存的是一组int(key)-Object(value)对。类似的还有:1.SparseIntArray2.SparseBooleanArray3.LongSparseArray 阅读全文
posted @ 2013-07-05 16:17 lulinan 阅读(351) 评论(0) 推荐(0)