今天思考了一下,我的下一步打算 SurfaceFlinger我要把它学习一遍、然后是binder机制各层学习一遍,同时研究下android的各种库中的崩溃研究一下。接下来就要转战服务器端开发,那么服务器端开发,python/go/java哪个好呢?
这几篇一定要看完它 https://www.bignerdranch.com/blog/kotlin-when-to-use-lazy-or-lateinit/ https://baike.baidu.com/item/%E8%87%AA%E7%84%B6%E5%AF%B9%E6%95%B0/270475?fr=aladdin http://cuijiahua.com/resource.html https://www.jianshu.com/p/f509c9a9cac0 https://emacs.stackexchange.com/questions/35923/how-do-you-recompile-an-el-source-file-and-make-it-active-in-my-current-session http://blog.51cto.com/androidigging/1426766 https://codelabs.developers.google.com/codelabs/developing-android-a11y-service/index.html?index=..%2F..%2Findex#6 https://juejin.im/post/5a14158df265da432c237bfc https://blog.csdn.net/feint123/article/details/77861740 https://willowtreeapps.com/ideas/generating-code-via-annotations-in-kotlin https://discuss.kotlinlang.org/t/how-to-pass-java-class-as-parameter-to-kotlin-annotation/2374/2 https://engineering.wework.com/custom-annotations-in-android-af43514f2f1b https://medium.com/@Tarek360/annotation-processor-to-avoid-boilerplate-af0b8820297d
我买的乐高瓦力,这两篇文章值得观看(关于颈部松懈的问题)http://www.joyj.com/i/241484.html和https://www.smzdm.com/p/5357181/
这篇文章绝对值得阅读和研究,https://juejin.im/post/5a291aca51882531926e9e3d 和https://juejin.im/post/5b6948086fb9a04fb87771fb
找到一篇好文章,可以看一看https://blog.csdn.net/carson_ho/article/details/73560642
有必要把Rxjava看一看啦
今天在研究kotlin中如何延迟给val赋值时,突然发现DSL很好玩啊 UIAutomator + python 找个东西挺好玩
// 注意,runnable并没有加private val,但是它被私有属性runnableWapper调用,这是为什么?
class MyHandler(runnable: Runnable) : Handler() {
private var runnableIsPosted: Boolean = false
private val runnableWapper = Runnable {
runnable.run()
runnableIsPosted = false
}
fun invokePostDelayed(delayMillis: Long) {
if (runnableIsPosted) {
removeCallbacks(runnable) // 这里会报错
}
postDelayed(runnable, delayMillis) // 这里会报错
runnableIsPosted = true
}
fun invokeRemoveCallbacks() {
if (runnableIsPosted) {
removeCallbacks(runnable) // 这里会报错
}
runnableIsPosted = false
}
}
今天打开1+5t和小米mix手机,漂亮的UI,细节的处理,深深地打动了我,让我有了冲动继续干互联网和干IT。
有一些文章还没有看,希望自己看一看找时间 - [x] http://blog.51cto.com/androidigging/1426766 https://stackoverflow.com/questions/442564/avoid-synchronizedthis-in-java https://www.jianshu.com/p/9da7bfe18374 https://stackoverflow.com/questions/44589669/correctly-implementing-wait-and-notify-in-kotlin https://zhuanlan.zhihu.com/p/27834417 https://developer.android.com/training/articles/user-data-ids?hl=zh-cn https://www.jianshu.com/p/40776c123adb https://www.jianshu.com/p/aecff29d6751 https://www.jianshu.com/p/756e94fa2e09
sublime看android源代码,记几个快捷键:
Command+P:查找文件 Command+R:查找方法
看android源代码就好像在看别人的艺术品,读同事的代码也要有这个态度就好了。
reified在kotlin是什么意思?
今天对kotlin和android单元测试的学习,写一下笔记。 * 从kotlin1.2开始,对lateinit var的变量,可以通过::var_name.isInitialized来判断它是否已经赋值; * 在companion object中创建的method,其实是类中Companion的非静态method,如果加上@JvmStatic,那么在类中就会生成一个静态method; * 在android中的单元测试中,@before和@after是一个类中每个方法开始执行前和执行结束后会被执行,若想在一个类只执行一个开始和结束,就用@beforeclass和@afterclass,在java中用static方法,在kotlin中用companion object,同时要用@JvmStatic
今天发现俩很好的命令,可以查看设备的宽高和密度 adb shell wm size
和adb shell wm density
在写一个单元测试,自定义了robolectric的一个shadow类,在里边维护了两个状态。可以简写成
class MyShadow {
boolean state0;
boolean state1;
// ...
}
如何维护两个状态呢?两个布尔值形成了4种状态,如果三个布尔值的话,会形成8种状态。假如这种1维的思维去思考一个类的设计,会觉得繁琐。有没有更好的办法,假如说两种布尔值之间是有联系的呢,会不会把一维的思维的升到二维的思维的去考虑,会不会简单一些?又该怎么去实施呢?