彭晓勇

个人博客-每日积累—水滴石穿

常用adb命令

1.获取anr 文件 adb pull /data/anr/traces.txt 2.获取栈顶activity: 123456789101.通过adb命令 adb shell dumpsys activity top adb shell dumpsys activity | grep Resumed adb shell dumpsys activity activities |......
adb

Just try how to write a blog

1.Some hexo command: 123456789101112131415161718192021222324252627hexo new post "<post name>" # you can change post to another layout if you wanthexo clean && hexo generate # generate......

探讨Android中View的getWidth( )和getMeasuredWidth( )的区别

1. 先上一张图 View核心方法调用顺序应该是 构造函数——->onMeasure——->onSizeChanged——->onLayout——->onDraw——-> onMeasure——->onLayout——->onDraw 2. View getMeasuredWidth 源码剖析: 12345public final int getM......

Git使用小结

1.git 全局配置 --loacl --system --global $ git config --global user.name author #将用户名设为author $ git config --global user.email author@corpmail.com #将用户邮箱设为author@corpmail.com 2.新增合并提交: $ git comm......
Git

How to use [Hexo] Theme

This is hexo theme Demo.

This HuWeihuang theme created by HuWeihuang modified from the original Porter YuHsuan Live Demo Hu Weihuang Blog : www.huweihuang.com Install Hexo Install Node.js and Git 123#For Macbrew install......

监听Android通知栏消息适配

1.关于vivo手机真机调试,安装失败 在gradle.properties,添加 android.injected.testOnly = false 2.OPPO短信监听的action有改变 <!--oppo 手机的短信action--> <action android:name="android.provider.OppoSpeechAssis......

RecycleView局部刷新

1.第一种方法: 12345678 public final void notifyItemChanged(int position, Object payload) { mObservable.notifyItemRangeChanged(position, 1, payload); }public void onBindViewHo......

DialogFragment实现底部弹框

1.第一种比较常用:设置style样式: 123456789101112131415161718 <style name="Animation" parent="@android:style/Animation"> <item name="android:windowEnterAnimation">@anim/push_bottom_in</item&......

All for the interview

1.第三方API 豆瓣最新热映电影:https://api.douban.com/v2/movie/in_theaters 2.maxAge与maxStale的区别: maxAge:没有超出maxAge,不管怎么样都是返回缓存数据,超过了maxAge,发起新的请求获取数据更新,请求失败返回缓存数据. maxStale:没有超过maxStale,不管怎么样都返回缓存数据,超过了maxS......

Java Volatile关键字详解

今天是17年十月份的最后一天,必须得写份博客来纪念一下! 1.volatile之可见性: 对于可见性,Java提供了volatile关键字来保证可见性。 当一个共享变量被volatile修饰时,它会保证修改的值会立即被更新到主存,当有其他线程需要读取时,它会去内存中读取新值。 而普通的共享变量不能保证可见性,因为普通共享变量被修改之后,什么时候被写入主存是不确定的,当其他线程去读取时,此时内......