├── LICENSE ├── README.md ├── architecture └── 架构合集.md ├── coderesource └── 源码相关.md ├── interview ├── java多线程.md ├── java数据结构和算法.md ├── 事件分发.md ├── 今日头条押题.md ├── 怎样回答问题.md ├── 美图押题.md ├── 设计模式.md ├── 面试前准备.md ├── 面试前总结.md └── 面试题.md ├── notes ├── data-structures │ └── Java数据结构和算法.md ├── development-of-art │ └── Android开发艺术探索.md ├── head-first │ └── OO设计原则.md ├── question.md ├── record.md └── 心灵鸡汤.md ├── src ├── collection.png ├── douban.png └── event.png ├── startInterview ├── 开始面试之今日头条.md ├── 开始面试之优信.md └── 开始面试之豆瓣.md └── treasure └── recommend.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 PleaseCallMeCoder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Topia 2 | 3 | - 记录我常逛的网站,以及一些比较好的博客,欢迎大家补全。 4 | 5 | - 我的笔记们。 6 | 7 | # 目录 8 | 9 | - [常逛的网站戳这里](https://github.com/PleaseCallMeCoder/Topia/blob/master/treasure/recommend.md) 10 | 11 | - [我的笔记](https://github.com/PleaseCallMeCoder/Topia/tree/master/notes) 12 | 13 | - [record](https://github.com/PleaseCallMeCoder/Topia/blob/master/notes/record.md) 14 | 15 | - [java数据结构和算法](https://github.com/PleaseCallMeCoder/LeetCodeMe) 16 | 17 | - [架构相关戳这里](https://github.com/PleaseCallMeCoder/Topia/blob/master/architecture/%E6%9E%B6%E6%9E%84%E5%90%88%E9%9B%86.md) 18 | 19 | - 开始面试系列 20 | 21 | - [今日头条](https://github.com/PleaseCallMeCoder/Topia/blob/master/startInterview/%E5%BC%80%E5%A7%8B%E9%9D%A2%E8%AF%95%E4%B9%8B%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1.md) 22 | 23 | - [优信](https://github.com/PleaseCallMeCoder/Topia/blob/master/startInterview/%E5%BC%80%E5%A7%8B%E9%9D%A2%E8%AF%95%E4%B9%8B%E4%BC%98%E4%BF%A1.md) 24 | 25 | - [豆瓣](https://github.com/PleaseCallMeCoder/Topia/blob/master/startInterview/%E5%BC%80%E5%A7%8B%E9%9D%A2%E8%AF%95%E4%B9%8B%E8%B1%86%E7%93%A3.md) 26 | 27 | -------------------------------------------------------------------------------- /architecture/架构合集.md: -------------------------------------------------------------------------------- 1 | # 关于架构思路的整理 2 | 3 | ## A关于架构的思考 4 | 5 | [http://keeganlee.me/post/architecture/20160621](http://keeganlee.me/post/architecture/20160621) 6 | 7 | ## B关于架构的思考 8 | 9 | [http://www.liuguangli.win/archives/299](http://www.liuguangli.win/archives/299) 10 | 11 | ## A的架构实现 12 | 13 | [http://www.jianshu.com/users/50d56a1c64bf/latest_articles](http://www.jianshu.com/users/50d56a1c64bf/latest_articles) 14 | 15 | ## B的架构实现 16 | 17 | [http://www.jianshu.com/notebooks/3767449/latest](http://www.jianshu.com/notebooks/3767449/latest) 18 | 19 | ## 开源项目集合 20 | [https://github.com/XXApple/AndroidLibs/tree/master/%E5%AE%8C%E6%95%B4%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AEProject](https://github.com/XXApple/AndroidLibs/tree/master/%E5%AE%8C%E6%95%B4%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AEProject) 21 | 22 | ## 架构合集 23 | 24 | [https://github.com/AlanCheen/Android-Resources/blob/master/Architecture.md](https://github.com/AlanCheen/Android-Resources/blob/master/Architecture.md) 25 | 26 | ## 另一个架构合集 27 | 28 | [https://github.com/CameloeAnthony/AndroidArchitectureCollection](https://github.com/CameloeAnthony/AndroidArchitectureCollection) 29 | -------------------------------------------------------------------------------- /coderesource/源码相关.md: -------------------------------------------------------------------------------- 1 | # 源码解析 2 | 3 | [源码解析](https://github.com/LittleFriendsGroup/AndroidSdkSourceAnalysis) 4 | -------------------------------------------------------------------------------- /interview/java多线程.md: -------------------------------------------------------------------------------- 1 | #多线程 2 | 3 | [多线程面试题](http://www.androidchina.net/5214.html) 4 | -------------------------------------------------------------------------------- /interview/java数据结构和算法.md: -------------------------------------------------------------------------------- 1 | #Java的集合以及其继承关系 2 | 3 | ![](https://github.com/PleaseCallMeCoder/Topia/blob/master/src/collection.png) 4 | -------------------------------------------------------------------------------- /interview/事件分发.md: -------------------------------------------------------------------------------- 1 | #Activity 2 | - onTouchEvent 3 | 4 | Return true if you have consumed(消费) the event, false if you haven't.The default implementation always returns false. 5 | 6 | - dispatchTouchEvent 7 | 8 | Return true if this event was consumed. 9 | -------------------------------------------------------------------------------- /interview/今日头条押题.md: -------------------------------------------------------------------------------- 1 | #往届面试题 2 | 3 | [2016.01.27](http://www.jianshu.com/p/8ee1bcc0f15e) 4 | 5 | [2015-09-09](http://www.100mian.com/mianshi/android/4211.html) 6 | 7 | [2016-03-31](http://blog.csdn.net/theone10211024/article/details/51025022) 8 | 9 | [2015-09-09](http://www.cnblogs.com/baokang/p/4828397.html) 10 | 11 | [2016-3-30](http://tvbingo.cn/forum.php?mod=viewthread&tid=494) 12 | 13 | [野生的](http://www.voidcn.com/blog/u010944680/article/p-3988007.html) 14 | 15 | [牛客网](http://www.nowcoder.com/) 16 | 17 | #怎么从100w个数中,找出100个最大数? 18 | 19 | step1:取前m个元素(例如m=100),建立一个小顶堆。保持一个小顶堆的性质的步骤,运行时间为O(lgm);建立一个小顶堆运行时间为m*O(lgm)=O(m lgm); 20 | step2:顺序读取后续元素,直到结束。每次读取一个元素,如果该元素比堆顶元素小,直接丢弃 21 | 如果大于堆顶元素,则用该元素替换堆顶元素,然后保持最小堆性质。最坏情况是每次都需要替换掉堆顶的最小元素,因此需要维护堆的代价为(N-m)*O(lgm); 22 | 最后这个堆中的元素就是前最大的m个。时间复杂度为O(N lgm)。 23 | 24 | #写一个二分算法 25 | 26 | public int binarySearch(int num){ 27 | System.out.println("****************使用二分法查找****************"); 28 | long startTime = System.currentTimeMillis(); 29 | Arrays.sort(array); 30 | int index = 0; // 检索的时候 31 | int start = 0; //用start和end两个索引控制它的查询范围 32 | int end = array.length - 1; 33 | count = 0; 34 | for (int i = 0; i < array.length; i++){ 35 | count++; 36 | index = (start + end) / 2; 37 | if(array.length - 1 == i){ 38 | System.out.println("抱歉,没有找到"); 39 | }else if (array[index] < num){ 40 | start = index; 41 | }else if (array[index] > num){ 42 | end = index; 43 | }else{ 44 | System.out.println(array[index] + "找到了,在数组下标为" + index + "的地方,查找了" + count + "次。"); 45 | break; 46 | } 47 | } 48 | long endTime = System.currentTimeMillis(); 49 | System.out.println("此次查询共花费" + (endTime - startTime) + "毫秒的时间。"); 50 | return count; 51 | } 52 | 53 | #链表相关 54 | 55 | [链表相关面试题](http://www.cnblogs.com/smyhvae/p/4782595.html) 56 | 57 | ##单链表的反转 58 | 59 | 例如链表: 60 | 61 |   1->2->3->4 62 | 63 | 反转之后: 64 | 65 |   4->3->2->1 66 | 67 | 思路: 68 | 69 |   从头到尾遍历原链表,每遍历一个结点,将其摘下放在新链表的最前端。注意链表为空和只有一个结点的情况。时间复杂度为O(n) 70 | 71 | 方法1:(遍历) 72 | 73 | //方法:链表的反转 74 | public Node reverseList(Node head) { 75 | 76 | //如果链表为空或者只有一个节点,无需反转,直接返回原链表的头结点 77 | if (head == null || head.next == null) { 78 | return head; 79 | } 80 | 81 | Node current = head; 82 | Node next = null; //定义当前结点的下一个结点 83 | Node reverseHead = null; //反转后新链表的表头 84 | 85 | while (current != null) { 86 | next = current.next; //暂时保存住当前结点的下一个结点,因为下一次要用 87 | 88 | current.next = reverseHead; //将current的下一个结点指向新链表的头结点 89 | reverseHead = current; 90 | 91 | current = next; // 操作结束后,current节点后移 92 | } 93 | 94 | return reverseHead; 95 | } 96 | 上方代码中,核心代码是第16、17行。 97 | 98 | 方法2:(递归) 99 | 100 | ##合并两个有序的单链表,合并之后的链表依然有序 101 | 102 | 例如: 103 | 104 | 链表1: 105 | 106 |   1->2->3->4 107 | 108 | 链表2: 109 | 110 |   2->3->4->5 111 | 112 | 合并后: 113 | 114 |   1->2->2->3->3->4->4->5 115 | 116 | 解题思路: 117 | 118 |   挨着比较链表1和链表2。 119 | 120 |   这个类似于归并排序。尤其要注意两个链表都为空、和其中一个为空的情况。只需要O (1) 的空间。时间复杂度为O (max(len1,len2)) 121 | 122 | 代码实现: 123 | 124 | //两个参数代表的是两个链表的头结点 125 | public Node mergeLinkList(Node head1, Node head2) { 126 | 127 | if (head1 == null && head2 == null) { //如果两个链表都为空 128 | return null; 129 | } 130 | if (head1 == null) { 131 | return head2; 132 | } 133 | if (head2 == null) { 134 | return head1; 135 | } 136 | 137 | Node head; //新链表的头结点 138 | Node current; //current结点指向新链表 139 | 140 | // 一开始,我们让current结点指向head1和head2中较小的数据,得到head结点 141 | if (head1.data < head2.data) { 142 | head = head1; 143 | current = head1; 144 | head1 = head1.next; 145 | } else { 146 | head = head2; 147 | current = head2; 148 | head2 = head2.next; 149 | } 150 | 151 | while (head1 != null && head2 != null) { 152 | if (head1.data < head2.data) { 153 | current.next = head1; //新链表中,current指针的下一个结点对应较小的那个数据 154 | current = current.next; //current指针下移 155 | head1 = head1.next; 156 | } else { 157 | current.next = head2; 158 | current = current.next; 159 | head2 = head2.next; 160 | } 161 | } 162 | 163 | //合并剩余的元素 164 | if (head1 != null) { //说明链表2遍历完了,是空的 165 | current.next = head1; 166 | } 167 | 168 | if (head2 != null) { //说明链表1遍历完了,是空的 169 | current.next = head2; 170 | } 171 | 172 | return head; 173 | } 174 | 175 | 代码测试: 176 | 177 | public static void main(String[] args) { 178 | LinkList list1 = new LinkList(); 179 | LinkList list2 = new LinkList(); 180 | //向LinkList中添加数据 181 | for (int i = 0; i < 4; i++) { 182 | list1.add(i); 183 | } 184 | 185 | for (int i = 3; i < 8; i++) { 186 | list2.add(i); 187 | } 188 | 189 | LinkList list3 = new LinkList(); 190 | list3.head = list3.mergeLinkList(list1.head, list2.head); //将list1和list2合并,存放到list3中 191 | 192 | list3.print(list3.head);// 从head节点开始遍历输出 193 | } 194 | 195 | ##用链表模拟加法,比如 1->2->3 , 4->-5>6->7 输出结果:4->6->9->0 196 | 197 | public ListNode addTwoNumbers(ListNode l1, ListNode l2) 198 | { 199 | ListNode root=new ListNode(0); 200 | ListNode node=root; 201 | int carry=0; 202 | while(l1!=null||l2!=null||carry!=0){ 203 | int sum=(l1!=null?l1.val:0)+(l2!=null?l2.val:0)+carry; 204 | node.next=sum%10; 205 | int carry=sum/10; 206 | node=node.next; 207 | l1=(l1!=null?l1.next:null); 208 | l2=(l2!=null?l2.next:null); 209 | } 210 | return root.next; 211 | } 212 | #算法题两部曲 213 | 214 | [one](http://m.blog.csdn.net/article/details?id=50998853) 215 | 216 | [two](http://m.blog.csdn.net/article/details?id=51003752) 217 | 218 | #单例模式 219 | 220 | [手写单例模式](https://github.com/GeniusVJR/LearningNotes/blob/master/Part1/DesignPattern/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F.md) 221 | 222 | public class Singleton { 223 | 224 | /** 225 | * 类级的内部类,也就是静态类的成员式内部类,该内部类的实例与外部类的实例 226 | * 没有绑定关系,而且只有被调用时才会装载,从而实现了延迟加载 227 | * @author dream 228 | * 229 | */ 230 | private static class SingletonHolder{ 231 | /** 232 | * 静态初始化器,由JVM来保证线程安全 233 | */ 234 | private static Singleton instance = new Singleton(); 235 | } 236 | 237 | /** 238 | * 私有化构造方法 239 | */ 240 | private Singleton(){ 241 | 242 | } 243 | 244 | public static Singleton getInstance(){ 245 | return SingletonHolder.instance; 246 | } 247 | } 248 | 249 | 250 | #Handler原理,使用Handler时注意的问题,Handlerthread使用 251 | 252 | [hongyang教你用Handlerthread](http://blog.csdn.net/lmj623565791/article/details/47079737) 253 | 254 | #除了Lru缓存算法,你还知道哪些缓存算法? 255 | 256 | [缓存](http://blog.jobbole.com/30940/) 257 | 258 | #TCP和UDP的区别,以及简单说了一下TCP三次握手协议 259 | 260 | [TCP和UDP](https://github.com/GeniusVJR/LearningNotes/blob/master/Part4/Network/TCP%E4%B8%8EUDP.md) 261 | 262 | 263 | 264 | 265 | -------------------------------------------------------------------------------- /interview/怎样回答问题.md: -------------------------------------------------------------------------------- 1 | #遇到不会的问题 2 | 其实对于问题,知道的话就好好说,不知道的话,可以说说思路和想法,然后说说以后会怎么做,利用迂回包抄策略去应答,准没错。至少给面试官知道你还是可以动脑子的人。 3 | 4 | #自我介绍 5 | 6 | 我叫XXX,英文名字XXX,XX省XX市人,今年6月将从XX学校XX专业本科(专科)毕业。除了简历上您看到的介绍,我愿意特别说一下我在XXX方面的特长/我最大的特点是……(给出事例)。正是基于对自己这方面的自信,使我有勇气来应聘贵公司的XXX这一职位。(看表)一分钟到了,希望我没有超时。(很阳光的微笑) 7 | 8 | #如何自学Android 9 | 10 | #项目介绍 11 | 12 | #遇到不会的问题是怎么解决的 13 | 14 | #图片缓存、三级缓存 15 | 16 | [三级缓存](http://www.jianshu.com/p/2cd59a79ed4a) 17 | 18 | #设计实现一个图片加载框架 19 | 20 | #事件分发机制 21 | 22 | [事件分发](http://www.jianshu.com/p/e99b5e8bd67b) 23 | 24 | #Activity启动模式 25 | 26 | #Activity生命周期 27 | 28 | #Fragment生命周期 29 | 30 | #AsyncTask原理 31 | 32 | [Async源码分析](https://github.com/GeniusVJR/LearningNotes/blob/master/Part1/Android/Asynctask%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90.md) 33 | 34 | #Handler机制 35 | 36 | [Handler机制](https://github.com/GeniusVJR/LearningNotes/blob/master/Part1/Android/%E7%BA%BF%E7%A8%8B%E9%80%9A%E4%BF%A1%E5%9F%BA%E7%A1%80%E6%B5%81%E7%A8%8B%E5%88%86%E6%9E%90.md) 37 | 38 | [如何生动形象的理解Android Handler消息处理机制](http://www.jianshu.com/p/28a6aeb4b6b0) 39 | 40 | #View绘制原理 41 | 42 | [View绘制](http://www.jianshu.com/p/5a71014e7b1b) 43 | 44 | [View绘制解析](http://blog.csdn.net/yanbober/article/details/46128379/) 45 | 46 | #进程间通信 47 | 48 | #开源框架源码分析 49 | 50 | [Volley](http://a.codekk.com/detail/Android/grumoon/Volley%20%E6%BA%90%E7%A0%81%E8%A7%A3%E6%9E%90) 51 | 52 | #JAVA虚拟机、垃圾回收 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /interview/美图押题.md: -------------------------------------------------------------------------------- 1 | #[美图面试经验整理](http://blog.5ibc.net/p/42228.html) 2 | 3 | ##单例模式 4 | 5 | [各种单例](https://github.com/GeniusVJR/LearningNotes/blob/master/Part1/DesignPattern/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F.md) 6 | 7 | [枚举类型](http://www.tuicool.com/articles/fmUZJbF) 8 | 9 | ##ListView的getview和优化 10 | 11 | viewholder进行view的复用,减少findview的次数 12 | 不要在getview中执行耗时操作 13 | 控制异步任务的执行频率 14 | 开启硬件加速 15 | 16 | - getview里面的viewholder为什么要设置成静态的? 17 | 18 | 如果声明成员类不要求访问外围实例,就要始终把static修饰符放在它的声明中,是它成为静态成员类,而不是非静态成员类。 19 | 20 | 因为非静态成员类的实例会包含一个额外的指向外围对象的引用,保存这份引用要消耗时间和空间,并且导致外围类实例符合垃圾回收时仍然被保留。如果没有外围实例的情况下,也需要分配实例,就不能使用非静态成员类,因为非静态成员类的实例必须要有一个外围实例。 21 | 22 | 23 | ##找出字符串中的第一个只出现一次的字符 24 | 25 | [两种方法](http://www.cnblogs.com/xwdreamer/archive/2012/09/26/2703739.html) 26 | 27 | ##fragment跟viewpager一起使用时候,fragment的加载机制是怎么样的? 28 | 29 | ##surfaceview 30 | 31 | [surfaceview](https://github.com/GeniusVJR/LearningNotes/blob/master/Part1/Android/SurfaceView.md) 32 | 33 | #[12年](http://blog.sina.com.cn/s/blog_9564cb6e0101el6r.html) 34 | -------------------------------------------------------------------------------- /interview/设计模式.md: -------------------------------------------------------------------------------- 1 | #讲的不错的设计模式 2 | 3 | [设计模式的应用](http://design-patterns.readthedocs.io/zh_CN/latest/index.html) 4 | -------------------------------------------------------------------------------- /interview/面试前准备.md: -------------------------------------------------------------------------------- 1 | 这里只简单列举一些东西,可能不是特别全,但是却特别适用,也不一定按照下面的流程,有可能是穿插的,也有可能都有,根据公司的规模以及面试官的心情而定(哈哈哈 ,你们就自求多福吧)。建议大家还是要将下面的东西全部掌握,没事写写代码,练练手,在项目中能用到的地方一定要用,有可能会遇到很多坑,一定要自己想办法填坑,之后回忆起这段经历,肯定可以敢理直气壮的跟别人讨论。如果你说的头头是道,那么对方会先输一层,然后在心里对你佩服。 2 | 3 | - 一般情况下第一轮都是基础面试,需要扎实的基础 4 | - 最常用的Android 基础知识 5 | - Java 基础知识 6 | - 了解一些 常用东西的原理,例如:handler, thread 等 7 | - 项目中的技术点 8 | - 第二轮的时候需要了解更深层次的东西 9 | - Android 事件分发机制原理 10 | - Android 绘图机制原理 11 | - WindowManager 的相关知识 12 | - 进程间传输方式 13 | - Java 内存管理机制 14 | - list,map 原理,以及子类之间的差别 15 | - 能进入第三轮基本没什么问题,但是要注意以下问题 16 | - 该轮一般是 老大或者部门负责人,问的问题一般都看 深度与广度 17 | - 当问及薪水的时候,要说一个合适的,小公司随意,大公司一定要慎重,当心里没底的时候,可以告诉对方,让对方给一个合理的薪资。一般都是在原工资基础之上增长,听猎头说一般涨幅都在15%-30%,超 NB 的可以要30%及以上,如果感觉自己还不错的,挺厉害的,建议最高20%,一般人就定在15% 左右最靠谱。公司内部一般有一套机制,根据公司情况而定。 18 | - 我们的面试原则就是拿到合理薪资,得到 offer 19 | - 个人发展情况,这个问题很难回答,如果和公司方向不符合,极有可能和公司无缘。建议多试探性的问问公司缺少什么,你能否给予公司对应的东西。当然对于有自我追求的人,那可以放心大胆的提。我的方向就是架构师,哈哈哈,挺极端的,别学我哦。我感觉选择都是双向的,因此我知道自己需要的是什么。 20 | - 你最擅长什么UI 还是其他什么?这个问题更不好回答。你要说你擅长 UI,是不是意味着你其他能力就不行?虽然我不知道面试官的用意,但是我能感觉到,这个问题不是那么好回答,我会回答说自己都行,来什么业务接什么需求。可能回答不太好,总之和公司的职位吻合就行,这样总不至于出错吧。 21 | 22 | 23 | #薪资 24 | 25 | 去大公司要的薪资不要太高,否则对方只能感谢你的到来,因为比你优秀的人太多了。 26 | -------------------------------------------------------------------------------- /interview/面试前总结.md: -------------------------------------------------------------------------------- 1 | #企业看重的能力 2 | 3 | - 学习能力 4 | - 解决问题的能力 5 | - 团队协作 6 | 7 | #为什么会离职 8 | 9 | 1.离开上一家公司是因为工作氛围太闷了,缺少设计氛围,所以非常希望找一个更加有活力有设计氛围的公司,而你们刚好有这些特点,所以我很想加入你们(夸对方公司工作氛围好)。 10 | 11 | #面试题 12 | 13 | ##Activity 14 | - 生命周期 15 | - Activity的任务栈和LaunchMode 16 | - 关于Activity需要考虑的几种情况 17 | - 当用户按下HOME键时 18 | - 长按HOME键,选择运行其他的程序时 19 | - 按下电源按键(关闭屏幕显示)时 20 | - 屏幕方向切换时,例如从竖屏切换到横屏时 21 | 22 | ##Fragment 23 | - 生命周期 24 | 25 | ##Service 26 | - Service的两种启动方式 27 | - 如何保证Service不死 28 | - IntentService的使用场景与特点 29 | 30 | ##Boardcast Receiver 31 | - 动态注册和静态注册有什么区别 32 | 33 | ##Context 34 | - 不同类型的Context 35 | 36 | ##自定义控件 37 | - 如何自定义控件: 38 | 39 | - 自定义属性的声明和获取 40 | - 分析需要的自定义属性 41 | - 在res/values/attrs.xml定义声明 42 | - 在layout文件中进行使用 43 | - 在View的构造方法中进行获取 44 | - 测量onMeasure 45 | - 布局onLayout(ViewGroup) 46 | - 绘制onDraw 47 | - onTouchEvent 48 | - onInterceptTouchEvent(ViewGroup) 49 | - 状态的恢复与保存 50 | 51 | 52 | ##Android不同版本特性 53 | 54 | ##Android中的进程和线程 55 | -------------------------------------------------------------------------------- /interview/面试题.md: -------------------------------------------------------------------------------- 1 | #面试文章 2 | 3 | ##我面试到底问什么? 4 | 5 | [http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=2650661871&idx=1&sn=158c380826bb9138fdb2976152dc279b#rd](http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=2650661871&idx=1&sn=158c380826bb9138fdb2976152dc279b#rd) 6 | 7 | ##80% 以上简历都是不合格的 8 | 9 | [http://b.codekk.com/detail/Trinea/%E4%B8%80%E5%A4%A7%E5%8D%8A%E4%BB%A5%E4%B8%8A%E7%AE%80%E5%8E%86%E9%83%BD%E6%98%AF%E4%B8%8D%E5%90%88%E6%A0%BC%E7%9A%84](http://b.codekk.com/detail/Trinea/%E4%B8%80%E5%A4%A7%E5%8D%8A%E4%BB%A5%E4%B8%8A%E7%AE%80%E5%8E%86%E9%83%BD%E6%98%AF%E4%B8%8D%E5%90%88%E6%A0%BC%E7%9A%84) 10 | 11 | ##你真的会写简历么? 12 | 13 | [http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=402970472&idx=1&sn=b9738c66fb5750c2515d57357c01a83f&scene=21#wechat_redirect](http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=402970472&idx=1&sn=b9738c66fb5750c2515d57357c01a83f&scene=21#wechat_redirect) 14 | 15 | ##面试回忆录 16 | 17 | [http://blog.csdn.net/theone10211024/article/details/51025022#comments](http://blog.csdn.net/theone10211024/article/details/51025022#comments) 18 | 19 | ##谈为何离职 20 | 21 | [http://design.jobbole.com/124954/](http://design.jobbole.com/124954/) 22 | 23 | #面试资源 24 | 25 | [面试题库1](https://github.com/GeniusVJR/LearningNotes) 26 | 27 | [面试题库2](https://hit-alibaba.github.io/interview/) 28 | 29 | [https://github.com/JackyAndroid/AndroidInterview-Q-A/blob/master/README-CN.md](https://github.com/JackyAndroid/AndroidInterview-Q-A/blob/master/README-CN.md) 30 | 31 | [http://www.jianshu.com/p/a22450882af2](http://www.jianshu.com/p/a22450882af2) 32 | 33 | [http://www.androidchina.net/5002.html](http://www.androidchina.net/5002.html) 34 | 35 | [http://www.androidchina.net/2817.html](http://www.androidchina.net/2817.html) 36 | 37 | [http://www.devstore.cn/essay/essayInfo/7195.html](http://www.devstore.cn/essay/essayInfo/7195.html) 38 | 39 | #Activity 40 | 41 | activity 是Context的子类,同时实现了window.callback和keyevent.callback, 可以处理与窗体用户交互的事件 42 | 43 | #Activity启动模式 44 | 45 | [http://www.jianshu.com/p/2a9fcf3c11e4](http://www.jianshu.com/p/2a9fcf3c11e4) 46 | 47 | #Context 48 | 49 | [http://www.jianshu.com/p/94e0f9ab3f1d](http://www.jianshu.com/p/94e0f9ab3f1d) 50 | 51 | #Activity Window View之间的三角关系 52 | 53 | [http://www.jianshu.com/p/a533467f5af5](http://www.jianshu.com/p/a533467f5af5) 54 | 55 | #Andorid中的线程 56 | 57 | [http://www.jianshu.com/p/d59b3cce2b54](http://www.jianshu.com/p/d59b3cce2b54) 58 | 59 | [http://blog.csdn.net/sdkfjksf/article/details/51556041](http://blog.csdn.net/sdkfjksf/article/details/51556041) 60 | 61 | #生命周期 62 | 63 | 生命周期描述的是一个类从创建(new出来)到死亡(垃圾回收)的过程中会执行的方法. 64 | 65 | #Activity生命周期 66 | 67 | #横竖屏切换时候Activity的生命周期 68 | 69 | 设置Activity的android:configChanges="orientation|keyboardHidden|screenSize"时,切屏不会重新调用各个生命周期,只会执行onConfigurationChanged方法 70 | 71 | #Activity在被系统回收之前保存当前状态 72 | 73 | protected void onSaveInstanceState(Bundle outState) { 74 | super.onSaveInstanceState(outState); 75 | outState.putLong("id", 1234567890); 76 | } 77 | public void onCreate(Bundle savedInstanceState) { 78 | //判断 savedInstanceState是不是空. 79 | //如果不为空就取出来 80 | super.onCreate(savedInstanceState); 81 | } 82 | 83 | #退出应用 84 | 85 | - System.exit(0); 86 | - 安全结束进程 android.os.Process.killProcess(android.os.Process.myPid()); 87 | 88 | #service 89 | 90 | ##service描述 91 | 92 | 默认情况,如果没有显示的指定service所运行的进程, Service和activity是运行在当前app所在进程的main thread(UI主线程)里面 93 | service里面不能执行耗时的操作(网络请求,拷贝数据库,大文件 )。 94 | 在子线程中执行 new Thread(){}.start(); 95 | Thread.currentThread().getName(); 96 | 特殊情况 ,可以在清单文件配置 service 执行所在的进程 ,让service在另外的进程中执行。 97 | 98 | ##service生命周期和启动方法 99 | 100 | 在Service的生命周期中,被回调的方法比Activity少一些,只有onCreate, onStart, onDestroy, 101 | onBind和onUnbind。 102 | 103 | #Activity启动模式 104 | 105 | 一个活生生的实例是,在Android默认提供的应用中,浏览器(Browser)的书签Activity(BrowserBookmarkPage),就用的是singleTop。 106 | 107 | #进程和线程 108 | 109 | #Intent和Intent Filter 110 | 111 | #单线程模型中Message、Handler、Message Queue、Looper之间的关系 112 | 113 | #NDK 114 | 115 | 什么时候用ndk:实时性要求高,游戏,图形渲染, opencv (人脸识别) , ffmpeg , rmvb mp5 avi 高清解码. ffmpeg, opencore 116 | 117 | #刷新view 118 | 119 | View view; 120 | 121 | view.invalidate();//主线程 122 | 123 | view.postInvalidate();//子线程 124 | 125 | #Android 数字签名 126 | 127 | #泛型 128 | 129 | - 泛型的主要目的之一就是用来指定容器要持有什么类型的对象,而且有编译器来保证类型的正确性。 130 | - 泛型类型的核心概念:告诉编译器想使用什么类型,然后编译器帮你处理一切细节。 131 | - 元组类库 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /notes/data-structures/Java数据结构和算法.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /notes/development-of-art/Android开发艺术探索.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /notes/head-first/OO设计原则.md: -------------------------------------------------------------------------------- 1 | #软件开发中的不变真理 2 | CHANGE 3 | 4 | #设计原则 5 | - 找出应用中可能需要变化之处,把它们独立出来,不要和那些不需要变化的代码混在一起。 6 | - 针对接口编程,而不是针对实现编程 7 | - 多用组合,少用继承 8 | 9 | #策略模式 10 | 定义了算法族,分别封装起来,让它们之间可以相互替换,此模式让算法的变化独立于使用算法的客户。 11 | 12 | 13 | -------------------------------------------------------------------------------- /notes/question.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /notes/record.md: -------------------------------------------------------------------------------- 1 | # 开源资源 2 | - [Android优秀开发资源](http://www.jianshu.com/p/ec3358875ee2) 3 | - [开源项目源码解析](https://github.com/android-cn/android-open-project-analysis) 4 | - [如何阅读开源项目源码](http://www.jianshu.com/p/be86e5678252) 5 | - [阅读源码套路](http://silencedut.com/2016/09/09/Android%E5%B8%B8%E7%94%A8%E5%BC%80%E6%BA%90%E6%A1%86%E6%9E%B6%E7%9A%84%E6%BA%90%E7%A0%81%E8%A7%A3%E8%AF%BB%E5%A5%97%E8%B7%AF/) 6 | - [开源App](http://www.jianshu.com/p/8180cc105f01) 7 | 8 | # 开源App源码 9 | - [开源App](https://www.coder4.com/archives/4340) 10 | 11 | # 架构 12 | - [Android应用开发架构概述](http://www.liuguangli.win/archives/299) 13 | - [Android开发最佳实践](https://github.com/futurice/android-best-practices/blob/master/translations/Chinese/README.cn.md) 14 | 15 | # 自定义控件 16 | - [多点触控](http://www.runoob.com/w3cnote/android-tutorial-touchlistener-ontouchevent.html) 17 | - [自定义控件们](https://github.com/madongqiang2201/views) 18 | 19 | # 杂七杂八 20 | - [开发技术前线](https://github.com/hehonghui/android-tech-frontier/wiki) 21 | - [codekk](https://github.com/Trinea/android-open-project#%E7%AC%AC%E4%BA%94%E9%83%A8%E5%88%86) 22 | 23 | 24 | -------------------------------------------------------------------------------- /notes/心灵鸡汤.md: -------------------------------------------------------------------------------- 1 | # 心灵鸡汤 2 | - [jQuery之父:每天都写点代码](http://blog.jobbole.com/66227/) 3 | - [为什么你有10年经验,但成不了专家?](https://zhuanlan.zhihu.com/p/20245698) 4 | -------------------------------------------------------------------------------- /src/collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PleaseCallMeCoder/Topia/4ed145f6eb561117eb426621d79927f8ce14ba67/src/collection.png -------------------------------------------------------------------------------- /src/douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PleaseCallMeCoder/Topia/4ed145f6eb561117eb426621d79927f8ce14ba67/src/douban.png -------------------------------------------------------------------------------- /src/event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PleaseCallMeCoder/Topia/4ed145f6eb561117eb426621d79927f8ce14ba67/src/event.png -------------------------------------------------------------------------------- /startInterview/开始面试之今日头条.md: -------------------------------------------------------------------------------- 1 | # 自我介绍 2 | 3 | # 项目介绍 4 | 5 | MVP模式和MVC模式的区别及优缺点 6 | 7 | # 算法 8 | - 100W个数,找出其中最大的100个数,以及算法的复杂度 9 | - 如何实现一个堆 10 | - 单链表反转 11 | 12 | # Java并发 13 | 14 | - 线程的管理 15 | - wait的使用特点是什么 16 | 17 | # java垃圾回收机制 18 | 19 | # 手写单例模式以及各种写法的优缺点 20 | 21 | # 性能优化 22 | 23 | - listview的优化,如何解决用户飞速滑动列表,图片加载顺序的问题 24 | - GC,GcRoot都包含什么 25 | - 如何进行性能优化的 26 | 27 | # Android基础实现 28 | 29 | - ThreadLocal 30 | - HandlerThread有什么作用,能解释它机制么 31 | - Handler,looper等的实现机制 32 | - 一个线程内的多个handler,消息是如何分发的 33 | - 如何保证一个线程内只有一个MessageQueen 34 | - SharedPreference是如何实现的 35 | 36 | # 手写SQlite的实现 37 | 38 | # 网络请求 39 | 40 | - TCP发送请求以及返回的全过程 41 | - HTTP协议 42 | - get和post的差别 43 | - 实现文件上传 44 | - 网络缓存的实现 45 | 46 | # 图片的三级缓存以及实现 47 | 48 | # 用过的框架的源码 49 | 50 | - volley 51 | - glide 52 | 53 | # 设计一个类封装单击双击事件处理 54 | 55 | # 总结 56 | 57 | 中间可能漏掉一两个小问题,不过大体就是这些。面试官问的问题偏向于API和框架等的实现原理。 58 | 59 | -------------------------------------------------------------------------------- /startInterview/开始面试之优信.md: -------------------------------------------------------------------------------- 1 | # 自我介绍 2 | 3 | # 介绍自己做过的项目 4 | 5 | # Java的类集框架 6 | - Java类集框架的组成,各自的特性 7 | - 排序(Map,List) 8 | 9 | # Andriod自定义控件 10 | - A和B能分别响应点击事件 11 | 12 | ![](http://i.imgur.com/dSNGMnm.png) 13 | 14 | 仔细分析下这个问题大概是着色游戏等需求的一个抽象,参考链接[Android 不规则图像填充 小玩着色游戏](http://blog.csdn.net/lmj623565791/article/details/45788433#comments)和[Android 不规则封闭区域填充 手指秒变油漆桶](http://blog.csdn.net/lmj623565791/article/details/45954255)。另一种方案是使用[Region](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B17%5Dtouch-matrix-region.md)类。 15 | 16 | # MVP模式 17 | - 特点和实现 18 | 19 | # Rxjava 20 | - 操作符 21 | - Map和FlatMap的区别 22 | 23 | # 总结 24 | 先是自我介绍,介绍完之后面试官让我介绍我做过的项目。然后他会从我的描述和简历的介绍里找我项目用到的功能点来展开提问(**Andoir的基础知识点和架构等**),中间会穿插一些基础知识,比如用到了哪些**数据结构和算法**,会哪些**设计模式**。 25 | 26 | -------------------------------------------------------------------------------- /startInterview/开始面试之豆瓣.md: -------------------------------------------------------------------------------- 1 | # 一如既往的自我介绍和项目介绍 2 | 3 | # 等待过程中扔给我的笔试题 4 | 5 | ![](https://github.com/PleaseCallMeCoder/Topia/blob/master/src/douban.png) 6 | 7 | # 算法 8 | 9 | ## 两个10以下的整数m和n,mxm+nxn如果的到的结果是1000这样的,第一位是1,之后全是0,达成。找不到,把结果的前两位数字拿出来执行同样的逻辑,直到达成为止。 10 | 11 | # Java多线程 12 | 13 | # Hadnler那一套 14 | 15 | # 性能优化 16 | 17 | # 封装一个网络请求框架,要求能处理大量的请求信息,自己封装好线程,缓存等等 18 | 19 | [网络框架专栏](http://blog.csdn.net/column/details/simple-net.html) 20 | 21 | # 事件传递机制 22 | - 基础的事件传递 23 | - 如何保证点击button,framelayout和button都能处理到事件。 24 | ![](https://github.com/PleaseCallMeCoder/Topia/blob/master/src/event.png) 25 | 26 | # MaterialDesign 27 | - behavior实现,自定义behavior 28 | - 新动画的实现原理 29 | 30 | # View的绘制流程 31 | 32 | # 垃圾回收,几种引用 33 | 34 | -------------------------------------------------------------------------------- /treasure/recommend.md: -------------------------------------------------------------------------------- 1 | ## 常逛的网站 2 | 3 | 1.Android开发中文站 http://www.androidchina.net/ 4 | 5 | 2.codeKK http://p.codekk.com/ 6 | 7 | 3.稀土掘金 http://gold.xitu.io/#/ 8 | 9 | 4.代码片段 http://www.phpxs.com/code 10 | 11 | 5.泡在网上的日子 http://www.jcodecraeer.com/ 12 | 13 | 6.DevStore http://www.devstore.cn/ 14 | 15 | 7.开发技术前线 http://www.devtf.cn/ 16 | 17 | 8.开发技术周报 http://www.androidweekly.cn/ 18 | 19 | 9.OPEN开发经验库 http://www.open-open.com/lib/ 20 | 21 | 10.干货集中营 http://gank.io/ 22 | 23 | 11.技术小黑屋 http://droidyue.com/ 24 | 25 | ## 技术博客 26 | 27 | 1.Trinea http://www.trinea.cn/ 28 | 29 | 2.胡凯 http://hukai.me/ 30 | 31 | 3.罗升阳 http://blog.csdn.net/Luoshengyang?viewmode=list 32 | 33 | 4.邓平凡 http://blog.csdn.net/innost?viewmode=list 34 | 35 | 5.代码家 http://blog.daimajia.com/ 36 | 37 | 6.stormzhang http://stormzhang.com/ 38 | 39 | 7.郭林 http://blog.csdn.net/guolin_blog 40 | 41 | 8.傲慢的上校 http://blog.csdn.net/lilu_leo 42 | 43 | 9.谦虚的天下 http://www.cnblogs.com/qianxudetianxia 44 | 45 | 10.ACE1985 http://blog.csdn.net/asce1885 46 | 47 | 11.qinjuning http://blog.csdn.net/qinjuning 48 | 49 | 12.任玉刚 http://blog.csdn.net/singwhatiwanna 50 | 51 | 13.light sky http://www.lightskystreet.com/ 52 | 53 | 14.markzhai http://blog.zhaiyifan.cn/ 54 | 55 | 15.Android开发最佳实践 https://github.com/futurice/android-best-practices/blob/master/translations/Chinese/README.cn.md 56 | 57 | 16.自定义控件们 https://github.com/madongqiang2201/views 58 | 59 | ## 非技术博客 60 | 61 | 1.MacTalk http://macshuo.com/ 62 | 63 | 2.阮一峰 http://www.ruanyifeng.com/home.html 64 | 65 | 3.李笑来 https://www.gitbook.com/@xiaolai 66 | 67 | ## 设计 68 | 69 | 1.生成shape http://angrytools.com/android/button/ 70 | 71 | 2.生成logo https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html 72 | 73 | 3.Material Design配色工具 http://www.materialpalette.com 74 | 75 | 4.图标素材 https://www.iconfinder.com 76 | 77 | 5.设计师作品交流平台dribbble https://dribbble.com 78 | 79 | 6.设计灵感pinterest https://www.pinterest.com 80 | 81 | 7.花瓣 http://huaban.com/ 82 | 83 | 8.最美应用 http://zuimeia.com/?platform=1 84 | 85 | 9.墨刀 https://modao.cc/ 86 | 87 | ## 应用分发 88 | 89 | 1.pre http://pre.im/ 90 | 91 | 2.fir http://fir.im/ 92 | 93 | ## 程序员歌单 94 | 95 | 1.musicforprogramming http://musicforprogramming.net/ 96 | 97 | ## 程序员自己的导航 98 | 99 | 1.极客导航 http://www.jikedaohang.com/ 100 | 101 | 102 | 103 | 104 | 105 | 106 | --------------------------------------------------------------------------------