![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android_基础知识
jiaoshi0531
一只蜗牛,一点一点往上爬
展开
-
androoid生命周期
前段时间参加了几场面试。发现android生命周期是是出现率比较高的。写个blog总结一下。顺便加强记忆测试的方法有构造方法:constructor();onCreate();onDestroy();onPause();onRestart();onResume();onStart();onStop();测试情况一:启动应用程序输出结果:constructor();onCreate();onStart();onResume();测试情况二:点击返回按键输出结果: onPause();onStop();onDe原创 2011-05-28 11:56:00 · 673 阅读 · 0 评论 -
android 应用程序优化
最近看了何晓杰讲的android关于优化的视频。学习很多以前不知道的知识。在这里记录下。 1.少使用递归,少使用服务 2.尽量避免过多的对象实例 3.静态方法执行快 4.少使用接口 5.不分配不必要的内存 6.不要让GC过干活 7.使用系统内的本地方法 8.使用J原创 2011-08-04 13:02:24 · 695 阅读 · 0 评论 -
android CountDownTimer 倒数计时器
Android系统内的内建类CountDownTimer提供了计时器的功能。它将后台线程的创建和Handler队列封装成为了一个方便的类调用。 CountDownTimer有两个参数,一个是倒计时时间量,另一个是处理onTick()回调的时间间隔,两者均以毫秒为单位。原创 2011-10-18 00:02:36 · 911 阅读 · 0 评论 -
从主线程调度runnable任务
实现一个计时器的功能 long mStartTime = 0L; TextView mTileLabel; Handler mHandler = new Handler(); public void onCreate(Bundle savedInstan原创 2011-10-18 00:15:38 · 853 阅读 · 0 评论