- 博客(8)
- 资源 (14)
- 收藏
- 关注
转载 ConcurrentHashMap 介绍
看到的不错的对ConcurrentHashMap的剖析,留此备份:ConcurrentHashMap是Java 5中支持高并发、高吞吐量的线程安全HashMap实现。在这之前我对ConcurrentHashMap只有一些肤浅的理解,仅知道它采用了多个锁,大概也足够了。但是在经过一次惨痛的面试经历之后,我觉得必须深入研究它的实现。面试中被问到读是否要加锁,因为读写会发生冲突,我说
2015-03-31 21:06:58 509
原创 an BUG in the AdMob's new GooglePlayServices Library
java.lang.NullPointerExceptionat android.webkit.WebViewClassic$WebViewInputConnection.setNewText(WebViewClassic.java:583)at android.webkit.WebViewClassic$WebViewInputConnection.setComposingText(
2015-03-23 19:21:57 1021
原创 Android 线程 Looper.prepare()、Looper.loop() 使用
优化项目过程中发现了一个很Low的问题,整理一下,备忘:说问题之前先看下HandlerThread的定义一个封装了looper的线程: Looper用于封装了android线程中的消息循环,默认情况下一个线程是不存在消息循环(message loop)的,需要调用Looper.prepare()来给线程创建一个消息循环,调用Looper.loop()来
2015-03-16 21:35:40 14242 5
原创 AnsycTask 2.3版本 及3.0后版本 使用比较
先来看下官方对AsyncTask 的解释:AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic threading framework. AsyncTasks should ideally be used for short operati
2015-03-16 16:56:56 953
转载 Android中正确存储特定的应用文件
原文地址:How to Correctly Store App-Specific Files in AndroidChristophe Versieux (Waza_be)发表了一篇rant about android developers’ bad habit to store files directly on the root of the sd card的文章。我非常赞同这
2015-03-05 17:42:18 765
原创 proguard Missing type parameter
在使用GSON后, 添加混淆打包后容易出现标题所述问题:E/BrowserCrashHandler(8889): java.lang.RuntimeException: Missing type parameter.E/BrowserCrashHandler(8889): at com.google.gson.reflect.TypeToken.getSuperclassTypeParam
2015-03-04 08:44:10 3811 1
转载 Android ANR 分析解决方法
一:什么是ANRANR:Application Not Responding,即应用无响应二:ANR的类型ANR一般有三种类型:1. KeyDispatchTimeout(5 seconds) --主要类型按键或触摸事件在特定时间内无响应2. BroadcastTimeout(10 seconds) --BroadcastReceiver在特定时间内无法处理
2015-03-03 21:13:06 927
原创 SharedPreferences.Editor commit ->apply
最近在做APP卡顿情况原因的排查,发现其中一个容易出现的优化点share preference.edit 经常在主线程中调用commit。通常我们是不需要commit结果的,完全可以替换为apply()方法。至于两者区别可以参考官方说明: abstract voidapply()Commit your preferences changes back fr
2015-03-01 16:03:39 1340
android 自定义camera
2012-08-02
Android安全与权限.pdf
2011-08-31
Android中文API合集.pdf
2011-08-31
WebView控件基本使用 Android
2011-08-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人