本文共 3488 字,大约阅读时间需要 11 分钟。
Android???????
??????????????Android????????????????????????????????????????????????
Activity???
Activity????
Activity?????????????????????????????????Activity??????
- running??????????????
- paused???????????????
- stopped?????????????
- killed????????
Activity??????
- onCreate()???Activity??????
- onStart()?????Activity-.onResume()?????
- onPause()?????
- onStop()?????
- onDestroy()???Activity
- onRestart()?????
???????
- ??????
- ????????????
- ????????????
- ?????????
- ?????????
Activity????
Activity????????????Activity?????
- standard?????
- singletop??????
- singletask??????
- singleinstance????
scheme?????
scheme??App???????????????Fragment???
Fragment????????????
Fragment?Activity?????????????????????????????Activity??Fragment????
- ???????static newInstance()
- ???????FragmentFactory.create()
FragmentPageAdapter?FragmentPageStateAdapter????
- FragmentPageAdapter??????????Fragment??????
- FragmentPageStateAdapter??????????Fragment????Fragment???
Fragment??????
- onAttach()????Activity
- onCreate()???Fragment
- onCreateView()???Fragment??
- onActivityCreated()?Activity????
- onStart()?????-.onResume()?????
- onPause()???
- onStop()???
- onDestroyView()?????
- onDestroy()???Fragment
- onDetach()??Activity??
Fragment????
- Fragment??Activity?getActivity()
- Activity??Fragment?????
- Fragment????FragmentManager.findFragmentById
Fragment?replace?add?remove???
- replace?????Fragment
- add?????Fragment
- remove?????Fragment
Service???
Service????
Service????????????????????Service?Thread????
- Service????????????????
- Thread??????????????Activity???
Service?????
- startService???????
- bindService????????????
Service?????
- startService?onCreate() ? onStartCommand() ? onDestroy()
- bindService?onCreate() ? onBind() ? onUnbind() ? onDestroy()
Broadcast Receiver???
Broadcast Receiver????
Broadcast????????????????Intent?????Broadcast Receiver??????
- ???????-??App???
Broadcast Receiver????
- ?????????
- ??????????
- ???????App??
- Sticky????????
Broadcast Receiver????
- ?????????
- ??????Activity????
Broadcast Receiver????
- ????????BroadcastReceiver???onReceive()
- ??Binder??
- AMS????
LocalBroadcastManager???
- ????
- ????
- ???
WebView???
WebView??????
API16?????????????????WebView.addJavascriptInterface?WebView?????
- ?onDestroy()???WebView??
- ??WebView.destroy()
WebView?jsbridge?
??JavaScript????????????WebViewClient?onPageFinished?
???WebChromeClient.onProgressChanged?WebView?????
??onDestroy()??System.exit(0)?WebView?????
??????????????WebView?????
- ????
- ???Context
Binder???
Linux?????
- ???????????
- ???????????
- Binder????????
Binder????
????????????Binder?????
- Service??Object?add??
- Client??Binder????????-Binder??ServiceManager????
AIDL?
- Stub????Proxy
- transact()??????-???????
Handler???
Handler????
??MessageQueue?Runnable?????Handler?????
- post(runnable)
- sendMessage(message)
Handler????????
????????????????- ???Activity
- ???????
- removeCallback()
AsyncTask???
AsyncTask????
??????Handler??????AsyncTask?????
- ?????Params?Progress?Result
- ?????onPreExecute?doInBackground?onProgressUpdate?onPostExecute?onCancelled
AsyncTask????????
????????????????- ???Activity
- ???????
- cancel()
AsyncTask?????
?Activity????????AsyncTask?????
???????????Activity????AsyncTask?????AsyncTask??????
- 2.3????
- 2.3????
- ????executeOnExecutor()????
HandlerThread???
HandlerThread????
???????????????HandlerThread???
- ?????Thread
- Looper???
- ????
IntentService???
IntentService????
???Service??????????????????IntentService?????
- ???IntentService
- ??onHandlerIntent()
- ??????????
??
???????
?????????????????????????????????????????????????????????????????????????发表评论
最新留言
关于作者