自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(327)
  • 资源 (14)
  • 收藏
  • 关注

原创 android打开系统文件管理器,过滤dwg文件

成功得到了类型,万岁。不理解的地方:为什么intent过滤类型的时候用MIME_TYPES,而不是直接用文件后缀。dwg文件对应的MIME_TYPES的string是什么?百度了一大堆,也试验了,都失败了。结果type还是null,哭晕。

2024-01-15 09:14:02 340

原创 Android 混淆配置

多模块编译minifyEnabled 主工程 模块 混淆结果(主工程,模块) true true true,true true false true, true, false true false,false false false false,false 编译主工程,模块源码依赖。编译出来的apk,...

2019-12-22 11:46:53 389

转载 java Lambda

  https://www.cnblogs.com/heimianshusheng/p/5663913.html

2019-01-01 21:27:24 318

原创 git学习

git config --localgit add -ugit mv 变更文件名git log --oneline(一行) -n4 (最近两次)git branch -avgit log --all(所有分支) --graph(分支演进)git log branch_name 查看分支名字git cat-file -p sh1 (查看内容)   -t(查看类型)gi...

2018-12-25 21:10:50 322

原创 android studio 下载插件

有时候,下载插件不成功。我也是一样的问题,并且是在有梯子的情况下,但是弄了好久终于解决了(虽然这个方法网上很多都说不推荐使用离线下载的插件包)首先是使用了梯子,确定可以进入国外的网站以后,进入了错误提示中提到的网站,也就是这个https://plugins.jetbrains.com/ 然后根据这个帖子https://blog.csdn.net/liujian8654562/artic...

2018-08-06 09:37:35 618

原创 webview长截图

private Bitmap get3(){ //获取webview缩放率 WebView wv_capture = mWebView; float scale = wv_capture.getScale();//得到缩放后webview内容的高度 int webViewHeight = (int) (wv_capture.get...

2018-05-13 11:50:08 829

原创 1. 好好读读源码 button

继承TextView. 代码极其少。关键的一句话,实现按下的特效。1.  D:\sdk\sources\android-27\android\widget\Button.java    public Button(Context context, AttributeSet attrs) {        this(context, attrs, com.android.internal.R.att...

2018-05-11 11:07:20 364

原创 windows 下载android源码

http://www.360doc.com/content/14/0325/16/7324690_363636972.shtmlhttps://blog.csdn.net/lpjishu/article/details/509056731.安装git bash2. git clone git://mirrors.ustc.edu.cn/aosp/platform/manifest3.cd mani...

2018-04-30 11:16:10 565

原创 加快gradle编译

https://blog.csdn.net/ahence/article/details/73603326

2018-04-13 23:04:05 267

原创 自助缴费

自动更新服务器地址:https://www.jianshu.com/p/6080b5367c80retrofit :https://www.jianshu.com/p/308f3c54abdd友盟:地图:butterknife : https://github.com/JakeWharton/butterknife

2018-03-16 11:38:35 820

原创 开始学习rxjava

https://www.zhihu.com/question/53151203http://wiki.jikexueyuan.com/project/rxjava//chapter1/what_is_different_in_rxjava.htmlhttps://github.com/kaushikgopal/RxJava-Android-Sampleshttps://www.jianshu.co...

2018-03-14 14:11:42 205

原创 kotlin下载地址

https://plugins.jetbrains.com/plugin/6954-kotlin

2018-02-28 14:16:29 2918

原创 android webview 注入jquery

https://bbs.exmobi.cn/thread-4094-1-1.htmlhttp://gundumw100.iteye.com/blog/1545714

2018-01-12 10:36:10 2093

原创 svn 合并代码

branch 开发完,合并到trunk。 在trunk里的,目录点右键,merge.

2018-01-12 10:35:16 512

原创 机器学习

https://www.zhihu.com/question/42536895https://zh.coursera.org/learn/machine-learninghttps://mooc.guokr.com/course/16/Machine-Learning/http://www.ia.cas.cn/yjsjy/zs/sszs/201709/t20170925_4864175.htmlM...

2018-01-06 17:09:19 258

原创 2017开源库分析

http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2017/0216/1.https://github.com/rom4ek/ArcNavigationView弧度是path贝塞尔曲线。裁剪用的是canvas.clipPath(clipPath)。

2018-01-05 16:49:36 264

原创 CatchUp 源码分析

https://github.com/hzsweers/CatchUpTechnologiesKotlinRxJava 2/AutoDisposeDebugging tooling as a first class citizen in the debug buildLeak Canary, Chuck, Scalpel, debug drawer, Steth

2017-12-13 16:53:39 362

原创 闭包

http://blog.csdn.net/yzzst/article/details/74619101

2017-12-12 18:53:11 208

原创 okhttp缓存

http://www.jianshu.com/p/9cebbbd0eeab

2017-10-11 15:05:56 286

原创 SmartRefreshLayout源码分析

先看看基本功能:BasicUsingActivity布局文件:<com.scwang.smartrefresh.layout.SmartRefreshLayout android:id="@+id/refreshLayout" android:layout_width="match_parent" android:layout_height="match_par

2017-10-10 10:06:16 1626

原创 MindmappingForAndroid脑图源码分析

https://github.com/tomaszi1/MindmappingForAndroid用的是一个SurfaceView实现,在上边画box。但是我感觉没必要,用普通的view就应该可以,因为没有什么动画。感觉用ViewDragHelper实现会比较简单。核心代码,就是对于触摸的控制。在选中状态,按两个手指,其中一个手指按中选中状态的box,另一个手指按中空白处,就可以新

2017-10-09 17:16:33 1356

原创 ExpandableLayout 源码分析

https://github.com/AAkira/ExpandableLayout带阻尼震动的效果,原来使用的是AnticipateInterpolator,差值器。ExpandableLinearLayouthttps://github.com/traex/ExpandableLayoutanimation = new Ani

2017-09-30 10:29:48 342

原创 android-autofittextview自适应字体大小源码分析。

https://github.com/grantland/android-autofittextview。用法:AutofitTextView android:id="@+id/output_autofit" android:layout_width="match_parent" android:layout_height="wrap_content"

2017-09-28 10:40:53 999

原创 ExpandableTextView源码分析

代码不多,看起来不复杂。https://github.com/Carbs0126/ExpandableTextViewgetViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlo

2017-09-27 09:28:31 240

原创 自定义Linearlayout

有一个需求。水平linearlayout,里有一个项目名称,右边紧跟项目属性。有一个问题出来了,当项目名称太长,项目属性会挤掉。所以当项目名称太长的时候,用省略号表示,项目属性居右。git里边有两种实现方式。推荐自定义Linearlayout。记得点STAR.https://github.com/xiayu98020214/MyLinearlayout

2017-09-21 11:03:26 350

原创 源码分析AisenWeiBo

https://github.com/wangdan/AisenWeiBo缓存时间: /** * 如果是获取历史数据,则历史数据的时间大于这个时间,将缓存刷新 * * @return */ public static int getRefreshInterval() { if (isDebug())

2017-09-13 17:06:46 251

原创 学习ionic

http://www.jianshu.com/p/3a8d7e23ed79淘宝镜像http://blog.csdn.net/metal1/article/details/53790360npm install -g cordova --registry https://registry.npm.taobao.orgnpm install -g ionic --r

2017-09-05 19:42:18 231

原创 开源中国客户端代码分析

【综合】界面: F:\code\android-app\app\src\main\java\net\oschina\app\improve\main\tabs\DynamicTabFragment.java 所有tilte信息都保存在F:\code\android-app\app\src\main\assets\sub_tab_original.json,会转换成实体类SubT

2017-08-29 21:43:44 536

原创 URL中%25E6%2588这样%25开头的字符是什么编码

http://www.cnblogs.com/jx270/p/4829589.htmlhttps://jingyan.baidu.com/article/6b182309ba6eaeba58e159cb.html

2017-08-24 15:59:59 12154

原创 图片压缩

1 .universalimageloader :默认的压缩方式:ImageScaleType.IN_SAMPLE_POWER_OF_2;protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) { ImageScaleType scaleTy

2017-08-24 10:28:36 282

原创 太多switch case ,if else if

太多switch case ,if else if, 说明程序有问题了,赶紧重构吧。耦合太强了。

2017-07-23 15:01:30 6467 4

原创 动态生成类的方法

有一个需求,为了避免生成一堆switch.  把swich的条件,和数据封装在一个表中,要用的时候遍历表就可以了。一般数据好办,但是要数据是类名,用的时候要通过类名,创建类名。//根据类名获取Class对象  Class c=Class.forName("java.lang.Integer");   //这一步可以省略,因为表中存的就是class,不是字符串。//参数类型数组

2017-07-22 07:53:34 615

原创 onSaveInstanceState调用时机以及fragment commit的时机

1.一个activity跳到另一个activity06-20 17:25:03.563 990-2448/? I/ActivityManager: START u0 {cmp=com.xiayu.androidservice/.SecondActivity} from pid 1661106-20 17:25:03.723 16611-16611/com.xiayu.androidserv

2017-06-20 19:12:41 542

原创 面试有感

泛型的研究 T和?http://www.cnblogs.com/lwbqqyumidi/p/3837629.htmlstring,stringbuffer,stringBuilder区别:http://blog.csdn.net/rmn190/article/details/1492013arraycoy 深copy浅copy。一定要拿出可靠的作品啊。代码来说话

2017-06-09 18:02:19 458

原创 headfirst 代理模式

http://www.androiddevtools.cn/

2017-06-08 16:51:30 363

原创 handler自己实现

灵感来自http://blog.csdn.net/honjane/article/details/61618317( java实现的简单框架)http://www.cnblogs.com/angeldevil/p/3340644.html(介绍了native)难点如何用java层实现messagequeue, 要延时功能的。我打算用LinkedBlockingQueue.

2017-06-06 10:39:24 890

原创 okhttp源码分析

http://www.jianshu.com/p/aad5aacd79bfokhttp3.4.11.同步请求关键代码RealCall @Override protected void execute() { boolean signalledCallback = false; try { Response response

2017-06-02 21:55:11 277

原创 android知识

activity1.running2.paused 不能交互3.stopped 完全被覆盖4.killed  oncreate        onstart看见了,不能点击,        onresume看见了,能点击home键 -》onpause->onstop(内存吃紧,可能被回收)                   onrestart-》ons

2017-05-31 14:59:05 244

原创 FrameLayout从源码中copy出来,完美运行。

https://github.com/xiayu98020214/Framelayou我把sdk24中的FrameLayout的代码copy出来,完美运行。看源码分析真的不行,一定要运行起来打log才能懂深,印象深刻。记得给我在github打星星啊。padding没有测试,后续会更新。

2017-05-26 19:02:17 476

原创 jianghejie/XRecyclerView内存泄漏问题

AVLoadingIndicatorView @Overridepublic void setVisibility(int v) { if (getVisibility() != v) { super.setVisibility(v); if (v == GONE || v == INVISIBLE) { mIndicatorC

2017-05-25 12:00:12 1094 1

native service例子

smack.tar 是一个native server 的例子 native_service.tar 是一个apk,验证native server。 http://blog.csdn.net/xiayu98020214/article/details/8895567

2014-02-24

anndroid 动态库 堆栈信息

android 动态库 堆栈信息解析工具

2013-11-23

动态库 堆栈信息

android so 中的堆栈可以打出来,但是看不见符号名称,注意要用有符号的so。例如 D/ ( 1104): #00 pc 00020166 /system/lib/libhwui.so (deleted) D/ ( 1104): #01 pc 00016586 /system/lib/libhwui.so (deleted) D/ ( 1104): #02 pc 00013e46 /system/lib/libhwui.so (deleted) 使用本工具可以看到名称。 python analyze_stack.py log 1:使用前修改 ANDROID_PRODUCT_NAME 2: 在源码目录中,执行。

2013-11-21

android widget 计算你还能活多长时间

参照源码中media widget,写的,用到了widget broadcastreceiver startd server SharedPreferences

2013-10-14

android widget

android widget 小应用。用到了intent ,broadcastreceiver,日期控件。

2013-10-10

surfaceflinger dump

surfaceflinger dump的调用过程。在linux下,用dia画的图。

2013-06-15

android 自定义系统服务 例子

http://blog.csdn.net/xiayu98020214/article/details/8850430,是配合博客的android4.04patch ,还有添加的文件,还有测试apk

2013-04-26

android 自定义 系统服务例子 patch

http://blog.csdn.net/xiayu98020214/article/details/8850430,我的博客的patch,不包括添加的文件,只是修改的patch

2013-04-26

自定义打log,方便取消log

自定义打log(printf),方便取消log.

2013-04-25

python获取firefox网站视频缓存

在fedore环境下,获取firefox的sohu视频缓存。用法:要先清理Cache.其他的看源码就很清楚了。导出数据放在/tmp/friend/下,按数字取名。

2013-04-25

vba编写的cad批量打印成pdf

自己编的vba程序,可以批量打印成pdf。有源码

2013-04-24

包外调用本地服务

和我的包内调用本地服务是一起的。这个包中会调用包外的本地服务。

2013-04-24

android 本地服务 例子

android 包内调用本地服务。外加activity生命周期,打的log。

2013-04-24

android 本地服务 代码例子

android 本地服务(local service)使用intent启动服务。外加activity的生命周期的log

2013-04-24

空空如也

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

TA关注的人

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