自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 如何读源码(新手读源码为什么困难)

前几个月写了一个android源码阅读工具,但担心有人不懂我写这个工具的目的在哪里,现在写写我对于读源码的一些体会。学过英语的同学可以回想一下,当你一篇英语文章一个字都不认识,这篇英语文章给你的感受,这就是新手读源码的感受。一个词的含义可以从字典上查,但一个一个查会耗尽人的耐心,也可以从上下文中多少看出来(自然语音基石word2vec充分证明这一点),但如果上下文中的单词你也不认识,那要如...

2020-03-08 12:29:53 1478 3

原创 unable to install new version of ‘/lib/x86_64-linux-gnu/libpng12.so.0‘: No such file or directory

unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directorysudo add-apt-repository ppa:linuxuprising/libpng12sudo apt updatesudo apt install libpng12-0

2022-07-13 19:30:53 686 5

原创 安卓底朝天 —— 从 startActivity 到 onCreate

fdsgvzdfg

2021-03-06 21:44:50 190 1

原创 安卓底朝天 —— android.database.sqlite.SQLiteDatabase.execSQL::String,Object: 调用栈

安卓底朝天 —— android.database.sqlite.SQLiteDatabase.execSQL::String,Object: 调用栈如果是 UPDATE 或者 DELETE 一类的 SQL 语句如果是创建表与删除表一类的 SQL 语句创建表与删除表一类的 SQL 语句的另一个调用栈如果你想简单的查第一个字段参数传递类搜索范围:android.database.sqlite:SQLiteDatabase,SQLiteStatement,SQLiteClosable,SQLiteProgra

2020-06-24 23:50:38 618

原创 安卓底朝天 —— android.animation.ObjectAnimator 与父类 ValueAnimator 的比较

安卓底朝天 —— android.animation.ObjectAnimator 与父类 ValueAnimator 的合作这篇文章是看看 ObjectAnimator 动画是如何动起来的,关于它的父类 ValueAnimator 请看 安卓底朝天 —— android.animation.ValueAnimator.start:: 的调用栈...

2020-06-23 17:41:07 267

原创 安卓底朝天 —— android.view.View.startAnimation::Animation: 的调用栈:动画的更新点和递归点

android.view.animation.Animation.start:::其中有括号的类是匿名类。

2020-06-17 13:49:47 439

原创 安卓底朝天 —— android.view.RenderNodeAnimator.start::: 的调用栈

安卓底朝天 —— android.view.RenderNodeAnimator.start::: 的调用栈下面我们可以总结调用栈了 @Override public void run() { long frameTimeMs = mChoreographer.getFrameTime(); mCallbackScheduled = false; int end = 0; fo

2020-06-04 14:29:46 992

原创 安卓底朝天 —— android.animation.ValueAnimator.start:: 的调用栈

安卓底朝天 —— android.animation.ValueAnimator.start:: 的调用栈从函数 start 到函数 onAnimationUpdate 中间经过了函数 postFrameCallback现在要看的是这个被 post 的 FrameCallback 实例:android.animation.AnimationHandler.mFrameCallback现在我们要看看函数 doAnimationFrame 是不是真的调用了你定义的 onAnimationUpdate现在我们可以

2020-06-04 13:20:09 421

原创 安卓底朝天—— android.os.Handler.post::Runnable: 的调用栈

安卓底朝天—— android.os.Handler.post::Runnable: 的调用栈Handler 中可调用的函数有:android.os.Handler.post::Runnable:android.os.Handler.postAtTime::Runnable,long:android.os.Handler.postAtTime::Runnable,Object,long:android.os.Handler.postDelayed::Runnable,long:android.o

2020-06-02 23:02:38 509

原创 安卓底朝天 —— android.view.Choreographer.postCallback::int,Runnable,Object: 的调用栈

handler 与 choreographer

2020-06-02 00:27:37 439

原创 安卓底朝天 —— 创建 DecorView 的调用栈

创建 DecorView 的调用栈从 DecorView 的实例开始com.android.internal.policy.DecorView 的一个重要的实例:com.android.internal.policy.PhoneWindow.mDecor,根据它的注释,它是视图树的根节点。 // This is the top-level view of the window, containing the window decor. private DecorView mDecor;

2020-05-31 17:39:14 430

原创 安卓底朝天 —— 触摸事件的调用栈

安卓底朝天 —— 触摸事件的调用栈http://localhost:8888/method_usage:android.view:ViewGroup,View,ViewRootImpl,[email protected]::MotionEvent:

2020-05-23 16:22:53 223

原创 安卓百宝箱:android.util.*

安卓百宝箱:android.util.*android.util.Rangeandroid.util.Rational如果下面的类中有你需要实现的功能,请使用 ctr+c/v,安卓源码阅读地址:http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/util/android.util.Rangepublic final class Range<T extends Comparable<? super T

2020-05-22 12:24:28 494

原创 Base64 编码:文档翻译,解释与举例

Base64 编码:文档翻译,解释与举例文档部分翻译与解释举例文档链接:https://www.ietf.org/rfc/rfc2045.txt文档部分翻译与解释Base64 Content-Transfer-Encoding 目的是用一种人类不可读的形式表示一个八位字节序列。编码和解码算法很简单,但编码数据始终仅比未编码数据大33%。编码过程将输入的24位比特的数据表示为4个字符的输出字符串。将连续的3个8位比特数据形成的24位比特数据看成是4个6位比特的数据,然后将这4个6位比特的数据变成

2020-05-19 18:58:14 1322 1

原创 android.view.View.PFLAG_DRAWN

android.view.View.PFLAG_DRAWN受 PFLAG_DRAWN 影响的函数android.view.ViewGroup.damageChildInParent::int,int,Rect:android.view.ViewGroup.invalidateChildInParent::int,Rect:android.view.View.invalidateInternal::int,int,int,int,boolean,boolean:设置 PFLAG_DRAWN 的函数androi

2020-05-16 20:08:02 341

原创 View.transform 与 View.scroll 与 Canvas.transform

scroll 与 translate

2020-05-09 12:42:43 220

原创 android 源码下载地址链接

https://dl.google.com/android/repository/sources-29_r01.ziphttps://dl.google.com/android/repository/sources-27_r01.ziphttps://dl.google.com/android/repository/sources-26_r01.zip。。。。。。https://dl.go...

2020-05-08 16:46:06 1098

原创 安卓底朝天 —— onTouchEvent 中的参数 MotionEvent 从哪里来?

onTouchEvent 中的参数 MotionEvent 从哪里来?我们在下面的几个类中搜索 android.view.View.onTouchEvent::MotionEvent:Parameter1(意思是函数 onTouchEvent 的第一个参数):android.view.Viewandroid.view.ViewGroupandroid.view.ViewRootImpla...

2020-05-07 01:04:38 284

原创 安卓底朝天 —— ListView 在什么时候添加子视图?

ListView 在什么时候添加子视图?这是个什么问题AdpaterView 如何让用户无法使用 addViewViewGroup添加的子视图存放在哪里ViewGroup.mChildren 在哪个函数中被直接赋值ListView 中哪里调用了 ViewGroup.addInArray::View,int:因此我们的结论是:ListView 在它布局的时候添加子视图。这是个什么问题ListVi...

2020-05-05 00:51:05 232

原创 安卓底朝天 —— Canvas 从哪里来到哪里去?

Canvas 从哪里来到哪里去?看图看图下图中可以看出,Canvas来自Surface.mCanvas,通过函数Surface.lockCanvas取得,传入函数View.draw下面来看函数View.draw的参数传给了:不仅传给了函数View.onDraw,用于画自己,还传给了函数ViewGroup.dispatchDraw,用于画子视图。函数ViewGroup.dispatchDr...

2020-05-02 19:23:28 391

原创 安卓底朝天 —— 从 ViewRootImpl.TraversalRunnable.run 到 onMeasure,onLayout,onDraw

从 android.view.ViewRootImpl.TraversalRunnable.run::: 到 android.view.View.onMeasure::int,int:函数栈函数栈onMeasure的函数栈:android.view.ViewRootImpl.TraversalRunnable.run:::android.view.ViewRootImpl.doTrav...

2020-04-28 22:32:37 469

原创 伴你读 android.widget.RelativeLayout.getChildMeasureSpec

伴你读 android.widget.RelativeLayout.getChildMeasureSpec源码背景函数概览源码 /** * Get a measure spec that accounts for all of the constraints on this view. * This includes size constraints imposed ...

2020-04-28 14:48:25 130

原创 伴你读 android.widget.RelativeLayout.DependencyGraph.getSortedViews

伴你读 android.widget.RelativeLayout.DependencyGraph.getSortedViews源码先讲讲背景函数的概览源码 /** * Builds a sorted list of views. The sorting order depends on the dependencies * between t...

2020-04-27 12:57:47 184

原创 伴你读 android.widget.RelativeLayout.DependencyGraph.findRoots

伴你读 android.widget.RelativeLayout.DependencyGraph.findRoots源码先讲讲背景函数的概览源码 /** * Finds the roots of the graph. A root is a node with no dependency and * with [0..n] dependent...

2020-04-21 17:46:48 340

原创 伴你读 android.view.ViewGroup.getChildMeasureSpec

android.view.ViewGroup.getChildMeasureSpec::int,int,int:源码先讲讲背景函数的概览源码 /** * Does the hard part of measureChildren: figuring out the MeasureSpec to * pass to a particular child. This metho...

2020-04-19 21:48:13 168

原创 如何使用我的工具读一个复杂的类

工具的链接https://blog.csdn.net/doubledong1994/article/details/104410638https://github.com/doubledong94/android-source-reader如果类中的函数中没有调用其它函数,只有对属性的读取与赋值,那这个类会非常容易读,但大部分类中的函数都会调用别的函数,代码的复用也鼓励函数调用,这时当你想...

2020-03-13 17:37:44 172

原创 如何使用我的工具读一个复杂的函数

工具的链接https://blog.csdn.net/doubledong1994/article/details/104410638https://github.com/doubledong94/android-source-reader以函数android.view.View.setFlags::int,int:为例 /** * Set flags control...

2020-03-11 17:39:16 308

原创 android source reader 安卓源码阅读工具

这个工具如何帮你读安卓代码1. 查看类a. 类的父类和子类b. 类中的属性和方法c. 类所产生的实例(包括局部变量)2. 查看函数a. 函数的源码b. 函数的参数与返回c. 函数中语句的分类统计d. 函数中局部变量的使用情况e. 函数所产生的属性的读写(局部变量的过渡作用已考虑在内)3. 查看属性a. 属性的类型...

2020-02-20 15:02:49 706

空空如也

空空如也

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

TA关注的人

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