上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页

2015年8月4日

android 进程/线程管理(三)----Thread,Looper / HandlerThread / IntentService

摘要: Thread,Looper的组合是非常常见的组合方式。 Looper可以是和线程绑定的,或者是main looper的一个引用。 下面看看具体app层的使用。 首先定义thread: 上面这个MyLoopThread类把,hangler,looper,thread融合在一起了,我们看看关键的地方: 阅读全文

posted @ 2015-08-04 16:44 Joyfulmath 阅读(2355) 评论(0) 推荐(0) 编辑

2015年8月2日

android 进程/线程管理(二)----关于线程的迷思

摘要: 一:进程和线程的由来 进程是计算机科技发展的过程的产物。 最早计算机发明出来,是为了解决数学计算而发明的。每解决一个问题,就要打纸带,也就是打点。 后来人们发现可以批量的设置命令,由计算机读取这些命令,并挨个执行。 在使用的过程中,有一个问题,如果要做I/O操作,是非常耗时的,这个时候CPU是闲着的 阅读全文

posted @ 2015-08-02 10:00 Joyfulmath 阅读(2093) 评论(1) 推荐(1) 编辑

2015年7月30日

android 进程/线程管理(一)----消息机制的框架

摘要: 一:android 进程和线程 进程是程序运行的一个实例。android通过4大主件,弱化了进程的概念,尤其是在app层面,基本不需要关系进程间的通信等问题。 但是程序的本质没有变,尤其是多任务系统,以事件为驱动的软件系统基本模式都是如下: 程序的入口一般是main: 1.初始化: 比如创建窗口,申 阅读全文

posted @ 2015-07-30 18:28 Joyfulmath 阅读(14742) 评论(2) 推荐(0) 编辑

2015年7月24日

android的屏幕保持常亮

摘要: 1.Wake Lock是一种锁的机制在Manifest.xml文件里面用user-permission声明。代码如下:这种方法,在安装apk时,系统会提示安装人是否允许使用禁止休眠功能。为了不对其他程序造成影响,启用和关闭屏幕常亮的代码一般被放在 Activity 的 onResume() 和 on... 阅读全文

posted @ 2015-07-24 15:34 Joyfulmath 阅读(469) 评论(0) 推荐(0) 编辑

2015年7月16日

android network develop(3)----Xml Parser

摘要: Normally, there are three type parser in android. Xmlpullparser, DOM & SAX. Google recomand Xmlpullparser to doing this. But to parser xml files or in 阅读全文

posted @ 2015-07-16 10:44 Joyfulmath 阅读(250) 评论(0) 推荐(0) 编辑

2015年7月15日

android network develop(2)----network status check

摘要: Check & Get network status Normally, there will be two type with phone network: wifi & mobile(gprs,3g,4fg) So, we have can test connect and get the co 阅读全文

posted @ 2015-07-15 10:25 Joyfulmath 阅读(525) 评论(0) 推荐(0) 编辑

2015年7月7日

android network develop(1)----doing network background

摘要: Develop network withHttpURLConnection & HttpClient.HttpURLConnection islightweight withHttpClient.So normally, you just needHttpURLConnection.NetWork ... 阅读全文

posted @ 2015-07-07 16:11 Joyfulmath 阅读(397) 评论(0) 推荐(0) 编辑

android 开发小记

摘要: 1.fragment & activitywhen config changes, activity will restart but fragment can be store.2.textviewCapstrue3.Service Running,When service is running ... 阅读全文

posted @ 2015-07-07 16:02 Joyfulmath 阅读(166) 评论(0) 推荐(0) 编辑

2015年6月30日

转 Android中shape中的属性大全

摘要: solid:实心,就是填充的意思android:color指定填充的颜色gradient:渐变android:startColor和android:endColor分别为起始和结束颜色,ndroid:angle是渐变角度,必须为45的整数倍。另外渐变默认的模式为android:ty... 阅读全文

posted @ 2015-06-30 16:33 Joyfulmath 阅读(178) 评论(0) 推荐(0) 编辑

2015年6月29日

转 Android学习 之 ColorStateList按钮文字变色

摘要: Windows平台VC,对于不同的按钮状态,采用不同的颜色显示文字,实现起来比较复杂,一般都得自绘按钮。但是Android里面实现起来非常方便。我们首先添加一个ColorStateList资源XML文件,XML文件保存在res/color/button_text.xml:Java代码Java代码Bu... 阅读全文

posted @ 2015-06-29 10:09 Joyfulmath 阅读(372) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页

导航