现在的位置: 首页 > 综合 > 正文

Activity 方法,Service 方法。

2011年06月26日 ⁄ 综合 ⁄ 共 444字 ⁄ 字号 评论关闭

Activity方法:

onCreate()

onRestart()

onStart()

onResume()

onPause()

onStop()

onDestroy()

onSaveInstanceState()

onRestoreInstanceState()

 

Service方法:

void onCreate()

void onStart(Intent intent)

void onDestroy()

 

Context.startServicel(),Context.stopService()

Service.stopSelf(),Service.stopSelfResult().

Context.bindService(),Context.unbindService().

 

如果一个服务允许别的进程绑定,则它还会有以下额外的回调方法以供实现:
IBinder onBind(Intent intent)
boolean onUnbind(Intent intent)
void onRebind(Intent intent)

抱歉!评论已关闭.