Android 事件分发

上图: 总结 dispatchTouchEvent:事件分发 onInterceptTouchEvent:事件拦截 onTouchEvent:事件处理,ACTION_DOWN的时候return true表示我要处理该事件,接下来的MOVE,UP等事件就会传进来,否则就不会再有其他事件传入。 requestDisallowInterceptTouchEvent: 子 ...

屏幕适配 dp, px, dpi ...

概念理理清: px 全称:pixel / 像素 dot 全称:墨点(物理点) ppi 全称:pixle per inch (图像分辨率) 解释:每英寸包含像素(px)的个数 dpi ...

Android IntentService 源码解读

先上源码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 p...

Android Handler跨进程 以及 内存泄漏分析

在理解Handler跨线程之前,需要先理解下面几个概念:ThreadLocal , MessageQueue , Looper ThreadLocal 一般来说,变量可以被不同线程读写,但是ThreadLocal只有当前线程可以读写,就像多进程一样,不同线程之间访问同一个ThreadLocal变量是完全独立互不干扰的; 源码 1 2 3 4 5 6 7 ...

Dagger 知识补充

@Dagger Scope 的生命周期 在 Dagger 2 官方文档中我找到一句话,非常清楚地描述了 @Scope 的原理: When a binding uses a scope annotation, that means that the component object holds a reference to the bound obje...

Hello World

"Hello World, Hello Blog"

HELLO WORLD “Yeah It’s on. ”