- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 Property Animation 源码学习
ValueAnimator.java /** * This method is called with the elapsed fraction of the animation during every * animation frame. This function turns the elapsed fraction into an interpolated f
2015-07-29 15:14:34 411
转载 java注解再学习
http://www.trinea.cn/android/java-annotation-android-open-source-analysis/不少开源库都用到了注解的方式来简化代码提高开发效率本文简单介绍下 Annotation 示例、概念及作用、分类、自定义、解析,并对几个 Android 开源库 Annotation 原理进行简析。一、Annotation 示例
2015-07-22 18:11:56 493
原创 Executor
public interface Executor { /** * Executes the given command at some time in the future. The command * may execute in a new thread, in a pooled thread, or in the calling * thread,
2015-07-16 17:22:59 395
原创 AsyncTask源码分析
AsyncTasks should ideally be used for short operations (a few seconds at the most.) If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs pr
2015-07-16 16:08:25 480
原创 快速查找长度未知的单链表的中间结点
在小甲鱼的《数据结构与算法》上,看到的一道企鹅的面试题。我想到的方法比普通的方法要快,但不是最快的。普通方法:先遍历单链表,获取长度后,再找到中间结点。假设长度是L,则所需时间为O(L)+O(L/2) = O(3/2L)我想到的方法:因为想到要获取中间结点,那必须知道长度啊,因此遍历单链表是必需的,在遍历时,将每个结点的值放在数组中,遍历结束知道长度后,从数组中取中间长
2015-07-12 20:31:39 703
转载 java并发1
Java Synchronized Blocks同一对象上的synchronized代码块,同一时刻只允许一个线程进入,其他想进入的线程只能等待,直到之前的线程退出代码块。有4中synchronized代码块Instance methodsStatic methodsCode blocks inside instance methodsCode blocks inside
2015-07-06 18:07:29 538
转载 Java 并发0
http://tutorials.jenkov.com/java-concurrency/concurrency-models.html单核-单任务-多任务“并发”并不仅仅指多线程,还可以是多任务,分布式系统。多线程的好处:更好的系统资源利用;相近的设计;更好地响应速度。多线程的代价:复杂的设计;上下文切换开销;线程自身的资源消费。并
2015-07-03 18:49:24 334
转载 为PopupWindow设置动画效果
原文: http://blog.csdn.net/starrexstar/article/details/7896835首先定义显示效果的动画文件:[html] view plaincopyxml version="1.0" encoding="utf-8"?> set xmlns:android="http://schemas
2015-07-02 10:57:41 456
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人