2021年7月7日

摘要: Dialog progressDialog = new Dialog(MainActivity.this, R.style.toast_dialog);progressDialog.setContentView(View.inflate(MainActivity.this, R.layout.dia 阅读全文
posted @ 2021-07-07 17:21 zhang11111wei 阅读(73) 评论(0) 推荐(0) 编辑

2021年4月25日

摘要: alias as="adb shell dumpsys activity activities | grep mResumedActivity" UncaughtExceptionHandler : ANR、crash https://www.bilibili.com/video/BV1YA411T 阅读全文
posted @ 2021-04-25 11:02 zhang11111wei 阅读(523) 评论(0) 推荐(0) 编辑

2021年2月18日

摘要: 一、OkHhtp的缓存策略 1.同步和异步的区别 里面有个Dispatcher这个类来实现,它主要作用是维护请求的状态(同步和异步),并且维护一个线程池,用于执行请求 同步请求 同步请求发送请求之后,就会进入阻塞状态,Dispatcher(分发器)主要做两个事情:保存同步请求、移除同步请求,直到收到 阅读全文
posted @ 2021-02-18 20:42 zhang11111wei 阅读(64) 评论(0) 推荐(0) 编辑

2021年2月2日

摘要: Principle 当我们一般在Viewer Class内使用ButterKnife来快速bind view。 public class FooViewer { @Bind(R.id.tv_title) View mTvTitle; public void init() { ButterKnife. 阅读全文
posted @ 2021-02-02 10:00 zhang11111wei 阅读(77) 评论(0) 推荐(0) 编辑

2021年2月1日

摘要: 一、systrace去看它的frame来判断 https://www.jianshu.com/p/75aa88d1b575这个是耗时操作的例子: 这个是打开保存下来systrace的html文件的网址:chrome://tracing/ 二、腾讯matrix 框架接入,可以设定阀值来打印耗时的方法 阅读全文
posted @ 2021-02-01 13:11 zhang11111wei 阅读(237) 评论(0) 推荐(0) 编辑

2021年1月28日

摘要: https://www.bilibili.com/video/BV1wf4y1s7TG?p=58 的学习网址 1. lateinit : 这个是肯定会被初始化 ::name.isLateinit : 当前name是否已经lateinit加载 2.by lazy : 每次只初始化一次,用的时候才去加载 阅读全文
posted @ 2021-01-28 14:42 zhang11111wei 阅读(75) 评论(0) 推荐(0) 编辑

2021年1月27日

摘要: 单向链表的反转 public class LinkedNode { Integer id; LinkedNode next; public LinkedNode(Integer id) { this.id = id; }}//创建链表 LinkedNode node1 = new LinkedNod 阅读全文
posted @ 2021-01-27 11:33 zhang11111wei 阅读(55) 评论(0) 推荐(0) 编辑
摘要: public Notification createNotification() { String channelId = createNotificationChannel("my_channel_ID", "my_channel_NAME", NotificationManager.IMPORT 阅读全文
posted @ 2021-01-27 11:24 zhang11111wei 阅读(171) 评论(0) 推荐(0) 编辑

2021年1月16日

摘要: 把直角图片改为圆角,通过改roundPx这个参数 fun toRoundBitmap(bitmap: Bitmap): Bitmap? { var width = bitmap.width var height = bitmap.height val roundPx: Float val left: 阅读全文
posted @ 2021-01-16 15:07 zhang11111wei 阅读(102) 评论(0) 推荐(0) 编辑

2020年12月11日

摘要: https://www.androidperformance.com/2018/05/07/Android-performance-optimization-skills-and-tools/ 全部先参考此链接:https://www.cnblogs.com/inception6-lxc/p/868 阅读全文
posted @ 2020-12-11 15:06 zhang11111wei 阅读(68) 评论(0) 推荐(0) 编辑

导航