├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ └── test1.png │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── scut │ │ │ │ └── carson_ho │ │ │ │ └── androidinterview │ │ │ │ ├── HashMapTest.java │ │ │ │ ├── AlgorithmLearning │ │ │ │ ├── Exam_64.java │ │ │ │ ├── Exam_41Test.java │ │ │ │ ├── Exam_65.java │ │ │ │ ├── Exam_2.java │ │ │ │ ├── Exam_43.java │ │ │ │ ├── Exam_50.java │ │ │ │ ├── Exam_42.java │ │ │ │ ├── Exam_63.java │ │ │ │ ├── Exam_41Solution.java │ │ │ │ ├── Exam_66.java │ │ │ │ ├── Exam_56_1.java │ │ │ │ ├── Exam_15.java │ │ │ │ ├── Exam_58_1.java │ │ │ │ ├── Exam_4.java │ │ │ │ ├── Exam_46.java │ │ │ │ ├── Exam_62.java │ │ │ │ ├── Exam_1.java │ │ │ │ ├── Exam_31.java │ │ │ │ ├── Exam_10.java │ │ │ │ ├── Exam_44.java │ │ │ │ ├── Exam_57.java │ │ │ │ ├── Exam_53_1.java │ │ │ │ ├── Exam_13.java │ │ │ │ ├── Exam_49.java │ │ │ │ ├── Exam_38_2.java │ │ │ │ ├── Exam_58.java │ │ │ │ ├── Exam_45.java │ │ │ │ ├── Exam_50_2.java │ │ │ │ ├── Exam_53_2.java │ │ │ │ ├── Exam_56.java │ │ │ │ ├── Exam_61.java │ │ │ │ ├── Exam_11.java │ │ │ │ ├── Exam_6 │ │ │ │ │ └── Exam_6.java │ │ │ │ ├── Exam_30.java │ │ │ │ ├── Exam_47.java │ │ │ │ ├── Exam_59.java │ │ │ │ ├── Exam_22.java │ │ │ │ ├── Exam_52.java │ │ │ │ ├── Exam_57_1.java │ │ │ │ ├── Exam_5.java │ │ │ │ ├── Exam_24.java │ │ │ │ ├── Exam_55.java │ │ │ │ ├── Exam_33.java │ │ │ │ ├── Exam_54.java │ │ │ │ ├── Exam_16.java │ │ │ │ ├── Exam_17.java │ │ │ │ ├── Exam_12.java │ │ │ │ ├── Exam_27.java │ │ │ │ ├── Exam_51.java │ │ │ │ ├── Exam_14.java │ │ │ │ ├── Exam_25.java │ │ │ │ └── Exam_21.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── scut │ │ │ └── carson_ho │ │ │ └── androidinterview │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── scut │ │ └── carson_ho │ │ └── androidinterview │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── .idea ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── Material ├── 操作系统 │ ├── 虚拟内存.md │ ├── 虚拟地址、逻辑地址、线性地址、物理地址的区别.md │ ├── (IPC)跨进程通信方式.md │ ├── 死锁的必要条件、处理方式.md │ ├── 进程、线程区别.md │ └── 页存储、段存储、段页存储.md ├── 数据结构 │ ├── 如何评判1个算法的好坏.md │ ├── 动态规划、贪心、分治算法.md │ ├── 递归 & 循环对比.md │ ├── 各种排序原理 & 性能对比.md │ ├── 二叉树的前、中、后序遍历:递归 & 非递归 写法,层序遍历算法.md │ ├── KMP算法.md │ ├── Hash函数构造 & 解决冲突.md │ ├── 图的BFS与DFS算法,最小生成树prim算法、最短路径Dijkstra算法.md │ ├── 冒泡、快排的改进.md │ ├── 二分查找 & 变种.md │ ├── 直接插入.md │ ├── 各种树:二叉树类、多路查找树(含B+树)、红黑树、哈夫曼树.md │ └── 希尔.md ├── Android │ ├── 其他 │ │ ├── kotlin.md │ │ ├── 断点续传.md │ │ ├── Zygote进程启动过程.md │ │ ├── 一键退出App.md │ │ ├── RxJava.md │ │ ├── Okhttp.md │ │ ├── 为什么不能在子线程操作UI.md │ │ ├── Retrofit.md │ │ ├── App的启动流程.md │ │ ├── Glide.md │ │ ├── 设计模式.md │ │ ├── 这里这里V-layout.md │ │ └── 8.0、7.0、6.0、5.0新特性.md │ ├── 基础使用 │ │ ├── 跨进程通信.md │ │ ├── 5种数据存储形式.md │ │ ├── 软引用、弱引用的应用场景.md │ │ ├── Asset目录 与 res:raw、res:drawable目录的区别.md │ │ ├── Android进程类型.md │ │ ├── Parcelable、Serializable的简介 & 区别.md │ │ ├── 长连接、心跳、推送.md │ │ ├── ListView的原理、优化 & RecyclerView.md │ │ └── 文件缓存方法:内存缓存 > 硬盘缓存 > 数据库缓存(SQLite) > 文件缓存.md │ ├── 自定义View │ │ ├── 布局性能优化:标签(include、viewstub、merge).md │ │ ├── Window、Activity、DecorView 和 ViewRoot的关系.md │ │ ├── Bitmap:4种解码方式属性、内存优化.md │ │ ├── 动画类型 & 特点.md │ │ ├── 事件分发机制.md │ │ └── 自定义View流程.md │ ├── 四大组件 │ │ ├── 四大组件简介.md │ │ ├── ContentProvider:使用、Intent、Binder.md │ │ ├── Broadcast:注册广播的两种方式.md │ │ └── Service:简介、生命周期、IntentService.md │ ├── 多线程 │ │ ├── 继承Thread类 : 实现Runnable、AsycTask、IntentService、HandlerThread的使用场景与特点.md │ │ ├── AsyncTask:原理 & 使用.md │ │ └── Handler相关:机制原理、发送方式的区别.md │ ├── 补充技术 │ │ ├── 插件化.md │ │ └── MVC、MVP、MVVM.md │ └── 性能优化 │ │ └── 内存(含泄露)、布局、绘制优化.md └── Java │ ├── 集合 │ ├── CountDownLatch.md │ ├── List、Set、Queue、Stack、Map的特点与用法.md │ ├── BlockingQueue & 实现类.md │ ├── Vector、ArrayList、LinkedList的存储特性 & 区别.md │ ├── Collection相关.md │ └── Map相关:子类继承、对比、HashCode()、HashMap原理、HashSet.md │ ├── 具体类 & 方法 │ ├── Object类的公有方法.md │ ├── 接口(Interface) 与 抽象类(abstract class)的区别.md │ ├── 不同情形下return 和 finally的执行顺序.md │ ├── Override与Overload的区别.md │ ├── 错误类型:Exception与Error包结构、OOM、SOF.md │ ├── static关键字(静态类、静态变量与普通的区别).md │ ├── 关键字:transient、volatile.md │ └── String相关(equals与==的区别、Switch能否用string做参数、String、StringBuffer 与 StringBuilder的区别、常用函数、正则表达式).md │ ├── 语言特性 │ ├── 对比 Java、C++.md │ ├── for each 、 for循环效率对比.md │ ├── Java的4种引用& 使用场景.md │ ├── 多态的实现原理.md │ ├── 8种基本数据类型、封装类 及 相关操作.md │ └── 面向对象的3个特征 & 含义.md │ ├── 机制 │ ├── wait()和sleep()区别.md │ ├── 实现多线程的两种方法:Thread与Runable.md │ └── 泛型相关:特点、List能否转为List、Java泛型与C++泛型区别.md │ └── 其他 │ ├── 错误类型:Exception与Error包结构、OOM、SOF.md │ ├── XML解析方式 & 与JSON对比.md │ └── Java 1.7、Java 1.8新特性.md ├── .gitignore ├── README.md ├── gradle.properties └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Android Interview 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/test1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/drawable/test1.png -------------------------------------------------------------------------------- /Material/操作系统/虚拟内存.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-3ec557c31b6ba0b1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Material/数据结构/如何评判1个算法的好坏.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-9885168c2426cd9d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Material/Android/其他/kotlin.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-78ca504d44e89bd9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | -------------------------------------------------------------------------------- /Material/Android/基础使用/跨进程通信.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-2b91e9265f990d6c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | -------------------------------------------------------------------------------- /Material/Java/集合/CountDownLatch.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-27b6ac1bf8b653e3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/数据结构/动态规划、贪心、分治算法.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-52fb936dc484363c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | -------------------------------------------------------------------------------- /Material/数据结构/递归 & 循环对比.md: -------------------------------------------------------------------------------- 1 | # 总结 2 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-2effe8320580060b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Carson-Ho/AndroidLearning/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Material/Android/其他/断点续传.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b1ee987ebcf507cf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/Object类的公有方法.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-ea3d9be2291b2f8c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/语言特性/对比 Java、C++.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-ae64fd4f1909cada.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | -------------------------------------------------------------------------------- /Material/操作系统/虚拟地址、逻辑地址、线性地址、物理地址的区别.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b56be092074c5eda.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/数据结构/各种排序原理 & 性能对比.md: -------------------------------------------------------------------------------- 1 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-e637f71380f02510.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /Material/Android/基础使用/5种数据存储形式.md: -------------------------------------------------------------------------------- 1 | 2 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-99ad3929dd9f3115.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 3 | -------------------------------------------------------------------------------- /Material/Android/基础使用/软引用、弱引用的应用场景.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-06f00eaad88e298c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | -------------------------------------------------------------------------------- /Material/Java/语言特性/for each 、 for循环效率对比.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-afc57b104575692e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/基础使用/Asset目录 与 res:raw、res:drawable目录的区别.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-18639a54a808044b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/自定义View/布局性能优化:标签(include、viewstub、merge).md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-46276a3b80b684fb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/接口(Interface) 与 抽象类(abstract class)的区别.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-0ea6c3e36874a706.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/语言特性/Java的4种引用& 使用场景.md: -------------------------------------------------------------------------------- 1 | 2 | 强、软、弱、虚 3 | 4 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-06f00eaad88e298c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 5 | -------------------------------------------------------------------------------- /Material/数据结构/二叉树的前、中、后序遍历:递归 & 非递归 写法,层序遍历算法.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-76ff9f5a98585715.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | 具体代码请看相关文章 -------------------------------------------------------------------------------- /Material/Java/机制/wait()和sleep()区别.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 相同作用:让当前线程暂停执行指定的时间 4 | 5 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-c8310eee490d4f05.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 具体请看下面的博客 2 | 3 | # CSDN博客 4 | http://blog.csdn.net/carson_ho 5 | 6 | # 简书博客 7 | http://www.jianshu.com/u/383970bef0a0 8 | 9 | # 稀土掘金 10 | https://juejin.im/user/58d4d9781b69e6006ba65edc -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Material/Android/四大组件/四大组件简介.md: -------------------------------------------------------------------------------- 1 | Activity、Service、BroadcastReceiver、ContentProvider 2 | 3 | 4 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-612adadc1c0658f9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/main/java/scut/carson_ho/androidinterview/HashMapTest.java: -------------------------------------------------------------------------------- 1 | package scut.carson_ho.androidinterview; 2 | 3 | import android.view.ViewGroup; 4 | import android.widget.Button; 5 | 6 | public class HashMapTest { 7 | 8 | 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/不同情形下return 和 finally的执行顺序.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-ec21807bb16946d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | 注:`finally`中最好: 4 | 1. 不要包含`return`,否则程序会提前退出 5 | 2. 且 返回值≠ `try` 或 `catch`中保存的返回值 -------------------------------------------------------------------------------- /Material/Android/四大组件/ContentProvider:使用、Intent、Binder.md: -------------------------------------------------------------------------------- 1 | [具体使用](http://blog.csdn.net/carson_ho/article/details/76101093) 2 | 3 | [Intent的使用 & 传递的数据类型](http://blog.csdn.net/carson_ho/article/details/51762131) 4 | 5 | [Binder原理](https://blog.csdn.net/carson_ho/article/details/73560642) -------------------------------------------------------------------------------- /Material/Java/机制/实现多线程的两种方法:Thread与Runable.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-506bdfcd04d9952f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | 具体请看文章: 4 | 5 | https://www.jianshu.com/p/834f336855c4 6 | https://www.jianshu.com/p/95b186fbf192 -------------------------------------------------------------------------------- /Material/数据结构/KMP算法.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-6bd41e801c739136.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-1c1e06f6d54f7a62.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Dec 26 20:35:29 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /Material/Android/四大组件/Broadcast:注册广播的两种方式.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-8d163ab3ca20de0b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | 4 | 5 | 具体请看文章:[Android四大组件:BroadcastReceiver史上最全面解析](https://blog.csdn.net/carson_ho/article/details/52973504) -------------------------------------------------------------------------------- /Material/Android/多线程/继承Thread类 : 实现Runnable、AsycTask、IntentService、HandlerThread的使用场景与特点.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-bdc91ae1bd3f6449.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | 4 | 具体请看文章:https://carsonho.blog.csdn.net/article/details/90690840 5 | -------------------------------------------------------------------------------- /Material/Java/集合/List、Set、Queue、Stack、Map的特点与用法.md: -------------------------------------------------------------------------------- 1 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-ec1bf90461aa1af9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2 | 3 | ![示意](http://upload-images.jianshu.io/upload_images/944365-2b2790a877fccf63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/其他/Zygote进程启动过程.md: -------------------------------------------------------------------------------- 1 | https://juejin.im/post/5a646211f265da3e3f4cc997 2 | 3 | https://github.com/LRH1993/android_interview/blob/master/android/advance/app-launch.md 4 | 5 | 6 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-50d7c8d546690f48.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/Override与Overload的区别.md: -------------------------------------------------------------------------------- 1 | - 简介 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-9e465aa6d1fd209e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | 6 | - 区别 7 | 8 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b07150087c3d013b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/集合/BlockingQueue & 实现类.md: -------------------------------------------------------------------------------- 1 | - 简介 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-cdb26d73eb2b2b22.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | 6 | - 实现类介绍 7 | 8 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-136b0ed5f43fd311.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/基础使用/Android进程类型.md: -------------------------------------------------------------------------------- 1 | Android将进程分为5个等级,按优先级 高->低: 2 | 1. 前台进程 (Foreground process) 3 | 2. 可见进程 (Visible process) 4 | 3. 服务进程 (Service process) 5 | 4. 后台进程 (Background process) 6 | 5. 空进程 (Empty process) 7 | 8 | 9 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-32c5d6c795e779ba.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/补充技术/插件化.md: -------------------------------------------------------------------------------- 1 | 2 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-69f5808d80c05898.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 3 | 4 | 5 | 6 | 7 | 8 | http://huachao1001.github.io/article.html?jm5sRCCG 9 | https://github.com/LRH1993/android_interview/blob/master/android/advance/plugin.md 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Material/Java/集合/Vector、ArrayList、LinkedList的存储特性 & 区别.md: -------------------------------------------------------------------------------- 1 | # 1. 存储特性 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-687dcb94f22f7705.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | # 2. 异同 6 | 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b111d52a8df7e94c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/基础使用/Parcelable、Serializable的简介 & 区别.md: -------------------------------------------------------------------------------- 1 | # 1. 序列化简介 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-6c74d86d1c569593.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | # 2. 方式的区别 6 | 7 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-51c021430ef9411f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/错误类型:Exception与Error包结构、OOM、SOF.md: -------------------------------------------------------------------------------- 1 | # 1. Exception与Error包结构 2 | ![示意图](https://img-blog.csdnimg.cn/img_convert/bdef05d323e3130b2a22e929fd7accfd.png) 3 | 4 | # 2. OOM 5 | ![示意图](https://img-blog.csdnimg.cn/img_convert/84d9db5907a4dc85ba33c507b4d47516.png) 6 | 7 | # 3. SOF 8 | ![示意图](https://img-blog.csdnimg.cn/img_convert/fd937f05f2e2ec9abe23b36b7e3a6bba.png) -------------------------------------------------------------------------------- /Material/Android/其他/一键退出App.md: -------------------------------------------------------------------------------- 1 | https://www.jianshu.com/p/269873a16937 2 | 3 | # 1. 需求本质 4 | 一键退出 `App` 其实是 两个需求: 5 | 1. 一键结束当前`App`所有的`Activity` 6 | 2. 一键结束当前`App`进程 7 | 8 | **即 需要2个步骤 才可 完成 一键退出 `App` 需求**。下面,我将根据这两个步骤进行功能实现讲解。 9 | 10 | # 2. 功能实现 11 | 12 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-2db15a6ac03d23b1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/其他/RxJava.md: -------------------------------------------------------------------------------- 1 | >https://www.jianshu.com/p/a406b94f3188 2 | 3 | # 1. 为什么要使用 4 | 可实现异步操作的功能需求外,基于事件流的链式调用 的使用方式 使得实现优雅、逻辑简洁 & 使用简单 5 | 6 | # 2. 原理 7 | 基于 一种扩展的观察者模式,被观察者 (Observable) 通过 订阅(Subscribe) 按顺序发送事件 给观察者 (Observer), 观察者(Observer) 按顺序接收事件 & 作出对应的响应动作 8 | 9 | - 观察者模式 10 | 11 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-13978bc10951c665.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Material/Android/其他/Okhttp.md: -------------------------------------------------------------------------------- 1 | https://github.com/LRH1993/android_interview/blob/master/android/open-source-framework/okhttp.md 2 | 3 | https://www.jianshu.com/p/050c6db5af5a 4 | 5 | 6 | # 1. 简介 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-f48072d21b613aaf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 | # 2. 原理分析 10 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-be62b45d02bad142.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/其他/为什么不能在子线程操作UI.md: -------------------------------------------------------------------------------- 1 | 本质规定:View 的操作必须在创建它的 UI 线程上进行 2 | 3 | 原因: 4 | Activity 的创建需要新建一个 ViewRootImpl 对象,而该对象则是使用主线程创建的 5 | 所以,只能有主线程才能修改UI 6 | 7 | 在其他非原始线程更新ui的情况:有,如 SurfaceView 就可在其他线程更新 8 | 9 | 10 | 为什么只有主线程能更新UI线程 11 | 12 | - 从代码角度:ViewRootImpl在更新UI的时候检查当前线程是不是创建它的线程,不然的话会报错。(Activity的onResume()之后,ViewRootImpl才实例化,在这之前用子线程更新UI是不会报错的) 13 | - 从设计角度:如果可以让多个线程更新UI,就要加锁来做线程同步,不然的话就会出现多个线程一起更新UI,导致花屏,和多个线程同时写文件导致文件错乱一样。而加锁来做线程同步的话,不但设计起来很麻烦很容易错,还会导致系统开销增大,性能下降。所以不单是Android,很多其它GUI系统都是使用单线程更新UI。 -------------------------------------------------------------------------------- /Material/操作系统/(IPC)跨进程通信方式.md: -------------------------------------------------------------------------------- 1 | # 1. 操作系统 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-a02153939ef92164.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | # 2. Android 6 | 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-2407304790900ea8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 | 10 | # 3. Bundle过程 11 | 12 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-1e8387bbcd6e8bb7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Java/其他/错误类型:Exception与Error包结构、OOM、SOF.md: -------------------------------------------------------------------------------- 1 | # 1. 包结构 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-23308a1c36d6c4a3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | 6 | # 2. SOF的情况 7 | 8 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-1f5894a9c637137e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 9 | 10 | # 3. Android的OOM 11 | 12 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-9cd3e7cfe0a74f90.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /app/src/test/java/scut/carson_ho/androidinterview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package scut.carson_ho.androidinterview; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Material/Android/多线程/AsyncTask:原理 & 使用.md: -------------------------------------------------------------------------------- 1 | # 1. 原理 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-3944b7ca7400b082.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | 6 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-c49cc95ee592c888.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 7 | 8 | 具体请看文章:[Android 多线程:AsyncTask的原理 及其源码分析](https://blog.csdn.net/carson_ho/article/details/79314326) 9 | 10 | 11 | # 2. 使用 12 | 具体请看文章:[Android 多线程:这是一份详细的AsyncTask使用教程](https://blog.csdn.net/carson_ho/article/details/79314325) -------------------------------------------------------------------------------- /Material/Java/其他/XML解析方式 & 与JSON对比.md: -------------------------------------------------------------------------------- 1 | # 1. 简介 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b000fb8773f65bfc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | # 2. 区别 6 | 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b5fce23366566d9d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 | 10 | # 3. 与JSON对比 11 | 12 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-f185987f8f2ab459.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 13 | 14 | - 总的来说,相比于 `XML`,`JSON`大小更小、解析方法更简单、解析速度更快。所以,`JSON`一定是你在数据交换格式选型中的首选 -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /Material/操作系统/死锁的必要条件、处理方式.md: -------------------------------------------------------------------------------- 1 | # 1. 定义 2 | 运行过程中,多个进程因争夺资源而造成的一种互相等待的僵局 3 | >若无外力作用,这些进程都将无法向前推进 4 | 5 | # 2. 原因 6 | 1. 竞争资源:请求同一有限资源的进程数 > 可用资源数 7 | 2. 进程推进顺序非法:请求 & 释放资源顺序不合理,如资源等待链 8 | 9 | # 3. 死锁的必要条件 10 | 11 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-50488e849fb157c7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 12 | 13 | 14 | # 4. 死锁的处理策略 15 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-d37c55d5ecc3468e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 16 | 17 | # 5. 银行算法介绍 18 | - 定义 19 | 最著名的死锁避免算法 20 | 21 | - 算法介绍 22 | 当进程首次申请资源时,要测试该进程对资源的最大需求量 23 | 若系统现存的资源可满足它的最大需求量,则按当前的申请量分配资源;否则,推迟分配 -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /Material/Java/具体类 & 方法/static关键字(静态类、静态变量与普通的区别).md: -------------------------------------------------------------------------------- 1 | # 1. 简介 2 | 3 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-70e1722b8304d87d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4 | 5 | # 2. 具体使用 6 | 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-006d5a9a3a21cb58.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 | 10 | 11 | # 3. 静态类 & 普通内部类的区别 12 | 13 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-af68fbb3c9009888.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 14 | 15 | 16 | # 4. 静态变量 & 实例变量 的区别 17 | 18 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-1e7a4d19d4419b94.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/数据结构/Hash函数构造 & 解决冲突.md: -------------------------------------------------------------------------------- 1 | # Hash函数 2 | - 作用:计算出key的散列地址 3 | 4 | - 构造方式 5 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-995a3761b24b0ff3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 6 | 7 | 8 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-0a716571f61c35eb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 9 | 10 | 11 | # 2.解决冲突方案 12 | - 简介 & 解决方案 13 | 14 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-3ebf4e95e054e42e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 15 | 16 | 17 | 18 | - 解决方案介绍 19 | 20 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-c8f3366e1e573554.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/自定义View/Window、Activity、DecorView 和 ViewRoot的关系.md: -------------------------------------------------------------------------------- 1 | # 1. 简介 2 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-b9c41aa994e8ddf4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 3 | 4 | # 2. 工作流程机制 5 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-34992eb46bdf93e7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 6 | 7 | - 每个 Activity 包含了一个 Window 对象 = PhoneWindow实现类对象 8 | - PhoneWindow 将 DecorView 作为了一个应用窗口的根 View 9 | - DecorView将屏幕划分为2个区域:TitleView、ContentView 10 | 11 | 我们平时在 Xml 文件中写的布局正好是展示在 ContentView 中的 12 | 13 | 14 | # 3. 源码分析 15 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-7628f5c6bdc57a0c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/其他/Retrofit.md: -------------------------------------------------------------------------------- 1 | >https://www.jianshu.com/p/050c6db5af5a 2 | >https://www.jianshu.com/p/a3e162261ab6 3 | 4 | 5 | # 1. 使用原因 6 | 短心跳的网络请求(性能高)、使用简单(注解配置请求、封装性好),同时配合RxJava使用 7 | ![示意图](http://upload-images.jianshu.io/upload_images/944365-f48072d21b613aaf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 | # 2. 原理 10 | `Retrofit` 本质上是一个 `RESTful` 的` HTTP` 网络请求框架的封装,即通过 大量的设计模式 封装了 `OkHttp` ,使得简洁易用。具体过程如下: 11 | 12 | 1. `Retrofit` 将 `Http`请求 抽象 成 `Java`接口 13 | 2. 在接口里用 注解 描述和配置 网络请求参数 14 | 3. 用动态代理 的方式,动态将网络请求接口的注解 解析 成`HTTP`请求 15 | 4. 最后执行` HTTP`请求 16 | 17 | 最后贴一张非常详细的`Retrofit`源码分析图: 18 | 19 | ![Retrofit源码分析图](http://upload-images.jianshu.io/upload_images/944365-56df9f9ed647f7da.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /Material/Android/四大组件/Service:简介、生命周期、IntentService.md: -------------------------------------------------------------------------------- 1 | # 1. Service相关 2 | https://carsonho.blog.csdn.net/article/details/53160049 3 | 4 | # 2. 生命周期 5 | https://carsonho.blog.csdn.net/article/details/53160137 6 | 7 | 2种启动方法的区别:生命周期调用过程不同、(功能上)无法操作Service、销毁时刻) 8 | 9 | # 3. IntentService & 区别 10 | https://carsonho.blog.csdn.net/article/details/90437126 11 | 12 | 13 | # 4. 如何保证Service不被杀死 14 | 15 | 2个方面考虑:降低进程被杀死的概率(提高进程优先级)、在进程被杀死后,进行拉活 16 | 17 | - Service保活 18 | 19 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-b14633bc4f594bd8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 20 | 21 | 22 | - 进程保活 23 | 24 | ![示意图](https://upload-images.jianshu.io/upload_images/944365-3568847da28a0f2a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 25 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 |