自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 android init 启动流程图

2021-05-26 16:55:52 116

原创 android zygote Start流程图

2021-05-16 17:28:06 105

原创 几核几线程咋理解(转)

物理CPU物理CPU就是计算机上实际配置的CPU个数。在linux上可以打开cat /proc/cpuinfo 来查看,其中的physical id就是每个物理CPU的ID,你能找到几个physical id就代表你的计算机实际有几个CPU。在linux下可以通过指令 /proc/cpuinfo | grep ‘physical id’查看cpu核数核数就是指CPU上集中的处理数据的cpu核心个数,单核指cpu核心数一个,双核则指的是两个。通常每个CPU下的核数都是固定的,比如你的计算机有两个.

2020-08-27 09:15:20 3521

原创 String StringBuffer StringBuilder 性能比较

for (int k = 0 ; k < 10; k++){ long start = System.nanoTime(); String str=""; for (int j = 0; j <100;j++){ for (int i = 0; i < 100;i++){ str = str+String.valueOf(i); } } long end = System.nanoTime.

2020-07-30 16:42:52 198

原创 为何 handlerThread.getLooper不会返回null

HandlerThread的使用方法如下:HandlerThread handlerThread = new HandlerThread("myTest");handlerThread.start();Looper looper = handlerThread.getLooper();Handler handler = new Handler(looper);为何getLooper方法不会返回空指针呢?public Looper getLooper() { if (!isAl

2020-07-22 13:52:32 1127

原创 json数据 在线格式化工具

https://tool.oschina.net/codeformat/json

2020-07-20 14:59:16 1628 1

原创 单例实现

方案一:public class SingleInstanceTest { private static volatile SingleInstanceTest mInstance; private SingleInstanceTest(){ } public static SingleInstanceTest getInstance(){ if (mInstance == null){ synchronized (Sin

2020-07-15 10:50:16 117 1

原创 注解限制参数类型

import androidx.annotation.IntDef;public class MyTest {public static final int VISIBLE = 1;public static final int INVISIBLE =2; @IntDef({VISIBLE,INVISIBLE}) @Retention(RetentionPolicy.SOURCE) @Target(ElementType.PARAMETER) public @i.

2020-07-14 14:56:05 2570

原创 软引用使用的一个注意点

BitmapSoftReference bitmapSoftRef = new SoftReference<Bitmap>();if(bitmapSoftRef.get() != null){ imageView.setImageBitmap(bitmapSoftRef.get());}合适的做法为:Bitmap bitmap =bitmapSoftRef.get();if(bitmap != null){ imageView.setImageBitm...

2020-07-14 09:18:16 156

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除