Skip to content

每周更新我看到的值得推荐的技术文章

Notifications You must be signed in to change notification settings

bboylin/AndroidWeekly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

AndroidWeekly : 每周更新值得推荐的技术文章

技术积累是一个工程师的底蕴,大学时期我也经常看技术文章,但是看过之后,时间久了就忘记了,一是没有去结合运用场景实践,二是没有总结和记录。工作以后业余时间没有大学那么多了,也更应该好好利用。 在这个库我会把自己业余所看到的不错的技术博客总结记录下来,长此以往,相信会一步一步看到自己的进步。收录博客主要涉及源码解析,设计模式,架构,新技术等方面,有不错的博客推荐欢迎提issue或者pr,点watch每期更新的时候都能收到提醒。

纸上得来终觉浅,绝知此事要躬行。

第一期:2018/11/5-2018/11/11

概要:匿名内部类持有外部实例引用的泄漏case。onFinishInflate一直会调用,但是onAttachedToWindow的调用:addView的时候parent view有window会立即调用,没有window会等parent attach to 一个window的时候调用。而且,View.onAttachedToWindow() is called on the first view traversal, sometime after Activity.onStart()

概要:Dalvik VM(Android 5.0以前)在当前message被消耗又没有新的message入队的时候不会gc掉这个message�,AlertDialog的onClickListener会入消息队列,被message持有,message发送的时候是copy了一份,最初的message并没有被发送,所以永远不会被回收,如果listener持有外部activity引用会造成内存泄漏。解决办法:clearOnDetach/send an empty message

概要:square tech leader PY重度使用fragment后的总结。1. Most of our difficult crashes were related to the fragment lifecycle. 2. We only need views to build a responsive UI, a backstack, and screen transitions.

概要:支付宝通过抑制GC提升启动速度的大致思路:取消 softlimit 检测,取消 GC 线程的唤醒,取消 GC 例程函数,OOM 停止 GC 抑制。

概要:使用Android官方live-data组件赋予data感知UI生命周期的能力。常出现在viewmodel中,主要有onActive(),onInactive(),setValue()几个重要方法。

概要:1.混淆。2.防hook。3.防抓包。4.防调试。5.签名校验。6.加固。

第二期:2018/11/12-2018/11/18

概要:fresco中封装的OOMSoftReference<T>中持有3个相同的SoftReference<T>,原因是Dalvik每次GC的时候会把排在偶数位的SoftReference当成WeakReference来处理(如果它的引用不是GC Roots可达),如果GC for alloc之后仍没有足够内存分配 ,所有的SoftReference都会被clear。这意味着只要某对象有一个SoftReference活着,那它所有的SoftReference都活着,所以利用两个连续的�SoftReference就能保证不会被GC,为了保险这里使用了三个。确保了只有在抛OOM之前OOMSoftReference在会被回收。

概要:RxJava vs kotlin coroutines

RxJava kotlin coroutines
Performance overhead 操作符生成大量对象 较少对象
Unreadable stacktrace Unreadable stacktrace
The learning complexity & Readability higher Readability

kotlin coroutines 写起来很像js的async await,非常接近同步写法了。

概要:R8 does all of shrinking, desugaring and dexing in one step. When comparing to the current code shrinking solution, Proguard, R8 shrinks the code faster while improving the output size.

第三期:2018/11/19-2018/11/25

概要:@JvmOverloads在Android开发中诸多的坑。。。

第四期:2018/11/26-2018/12/2

概要:Java字节码调方法的指令有:

第五期:2018/12/3-2018/12/9

概要:scaleType="matrix",with a default matrix the scale will be 1, the translation, rotation and skew will be 0, therefore the image will be drawn at the top left corner

第六期:2018/12/10-2018/12/16

第七期:2018/12/17-2018/12/23

第八期:2018/12/24-2018/12/30

第九期:2018/12/31-2018/1/6

About

每周更新我看到的值得推荐的技术文章

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published