摘要: 先上图啊,清晰明了:抓住三个状态就可以搞清楚具体的生命周期切换的函数调用了:Theentire lifetimeof an activity happens between the first call toonCreate(Bundle)through to a single final call toonDestroy(). An activity will do all setup of "global" state in onCreate(), and release all remaining resources in onDestroy(). For examp 阅读全文
posted @ 2012-10-17 23:08 大脚印 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Android开发最最蛋疼的地方莫过于需要将APP的UI适用到各种分辨率的手机上。也就是手机APP多分辨率的支持。(Android开发文档原文地址:http://developer.android.com/guide/practices/screens_support.html)Supporting Multiple ScreensAndroid runs on a variety of devices that offer different screen sizes and densities. For applications, the Android system provides a 阅读全文
posted @ 2012-10-17 18:03 大脚印 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 一个Android应用程序中,用户界面通过View和ViewGroup对象构建。Android中有很多种Views和ViewGroups,他们都继承自View类。View对象是Android平台上表示用户界面的基本单元。View类:extends Object implements Drawable.Callback KeyEvent.Callback AccessibilityEventSource这个类表示用户界面组件的基本构建块,一个View占据屏幕上的一个矩形区域,并负责绘图和事件处理。View类是widgets的基类,widgets用于创建交互式UI组件(buttons、te... 阅读全文
posted @ 2012-10-17 16:55 大脚印 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 通知的代码:1 NotificationManager mNotifiManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);2 Notification notification = new Notification(R.drawable.stat_sys_call_record, "停止", System.currentTimeMillis());//停止显示在状态3 notification.flags = Notification.FLAG_AUTO_CANCEL;4 阅读全文
posted @ 2012-10-17 12:59 大脚印 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 简介 Service是android系统中的一种组件,它跟Activity的级别差不多,但是它不能与用户交互,不能自己启动,不能自己运行,只能后台运行,并且可以和其他组件进行交互。Service的启动有两种方式:context.startService() 和 context.bindService()。1)使用context.startService() 启动Service是会会经历:context.startService() ->onCreate()- >onStart()->Service runningcontext.stopService() | ->onD 阅读全文
posted @ 2012-10-17 00:10 大脚印 阅读(735) 评论(0) 推荐(0) 编辑