- 博客(6)
- 资源 (10)
- 收藏
- 关注
原创 Android实战技巧:深入解析AsyncTask
AsyncTask的介绍及基本使用方法关于AsyncTask的介绍和基本使用方法可以参考官方文档和Android实战技巧:多线程AsyncTask这里就不重复。AsyncTask引发的一个问题上周遇到了一个极其诡异的问题,一个小功能从网络上下载一个图片,然后放到ImageView中,是用AsyncTask来实现的,本身逻辑也很简单,仅是在doInBackground中用HTTP请求把图
2012-09-16 00:02:49 106388 87
原创 Android Ticks: display text vertically
TextView of Android is a text label to display text. But it can show text only horizontally by default, left to right or right to left. There are some chances that we would like to show text verticall
2012-09-15 09:23:11 3635 1
原创 Android实战技术:Splash的实现
什么是SplashSplash也就是应用程序启动之前先启动一个画面,上面简单的介绍应用程序的厂商,厂商的LOGO,名称和版本等信息,多为一张图片,显示几秒钟后会自动消息,然后显示出应用程序的主体页面。在PC上,很常见各种平台的应用程序都会有,多半是一张图片显示在屏幕中央,如Microsoft Office系列,或者GIMP等。在各种游戏中Splash是最常见的,几乎所有的游戏开始都会有一张全屏
2012-09-11 21:56:55 30341 9
原创 Vim进阶技术:搜索和替换
行内搜索行内搜索,也就是在当前行内进行搜索和移动,通常都与编辑命令一起使用。fx -- 移动到下一个字符x的位置,光标停留在x字符上面tx -- 移动到下一个字符x的位置,光标停留在x前一个字符上Fx -- 移动到前一个字符x的位置,光标停留在x字符上面Tx -- 移动到前一个字符x的位置,光标停留在x后一个字符上; -- 重复前一个搜索,向着同一方向,即原来向前就向前,原来向后就向后
2012-09-10 22:02:04 13250
原创 一道面试题:餐馆模拟
前阵子遇到一个面试题,当时没有做出来,后来断断续续的用了一周的时间做了出来,但感觉也不完全对,先来看看题目,稍后再讨论。问题模拟一个餐馆,三个厨师,二个服务员,厨师单独做菜,2分钟一个菜,服务员单独送菜10秒一个分析一看这问题就知道考查的点是多线程,生产者与消费者模型的模拟类问题,《Java编程思想》中有类似的例子,但是这个问题比书中的例子要复杂一些,因为厨师和服务员都有多个,所以
2012-09-04 20:33:11 3808 2
原创 Android实战技术:Cursor相关的性能问题
当数据库中存有大量数据的时候,用Cursor查询时要注意,有可能引发性能问题。数据库查询出来的Cursor都会由一个CursorWindow来进行数据管理,包括内存空间的申请和数据的填充。CursorWindow对Cursor中的内容大小有限制,限制为1024*1024也就是1M,换句话说Cursor中数据的大小不能超过1M,如果超过1M会引发如下的错误:08-23 05:48:31.838:
2012-09-01 21:40:50 6916
The Artist’s Guide to GIMP, 2nd Edition
2012-10-20
Android本地代码生成器
2011-10-19
Android本地代码生成器
2011-10-19
Learning Vi and Vim editor
2009-05-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人