UI事件传递
一些事件传递机制的结论事件传递伪代码: 123456789public boolean dispatchTouchEvent(MotionEvent ev) { boolean consume = false; if (onInterceptTouchEvent(ev)) { consume = onTouchEvent(ev); } else { consume = child.dispatchTouchEvent(ev); } return consume;}
一些事件传递机制的结论事件传递伪代码: 123456789public boolean dispatchTouchEvent(MotionEvent ev) { boolean consume = false; if (onInterceptTouchEvent(ev)) { consume = onTouchEvent(ev); } else { consume = child.dispatchTouchEvent(ev); } return consume;}
libavcodec: 用于各种类型声音/图像编解码libavutil: 包含一些公共的工具函数libavformat: 包含多种多媒体容器格式的封装丶解封装工具libswscale: 用于视频场景的比例缩放丶色彩映射转换libpostproc: 用于后期效果处理libavdevice: 用于音视频数据采集和渲染等功能的设备相关ibswresample: 用于音频重采样和格式转换等功能libavfilter: 包含多媒体处理常用的滤镜功能
这是第一篇博客,我准备先将最近学习的笔记记录下来,数据结构最基础也最难吧,大佬就别看了。。。 Arraylist public class LouisArraylist<E> { int size; Object[] array; private static final int MIN_CAPACITY_INCREMENT = 12; public LouisArraylist(int capacity){ if(capacity<0){ throw new IllegalArgumentException(); } array = new Object[capacity]; } public LouisArraylist(){ array = new Object[0]; } public LouisArraylist(Collection<? extends E> collection){ Object[] a = collection.toArray(); if(a.getClass()!=Object[].class){ Object[] newArray = new Object[a.length]; System.arraycopy(a, 0, newArray, 0, a.length); a = newArray; } array = a; size = a.length; } /** * 扩容 * */ private static int newCapacity(int currentCapacity){ int increment = (currentCapacity<MIN_CAPACITY_INCREMENT/2)?MIN_CAPACITY_INCREMENT :currentCapacity>>1; return currentCapacity+increment; } /** * 增加 */ public boolean add(E object){ Object[] a = array; int s = size; if(s == a.length){ //需要扩容了 Object[] newArray = new Object[newCapacity(s)]; System.arraycopy(a, 0, newArray, 0, s); array = a = newArray; } a[s] = object; size = s + 1; return true; }