题目内容

在自定义的AsyncTask类中,为了更新用户界面 UI, 应该实现____________方法,这是运行在前台UI主线程中的方法,负责接收doInBackground() 方法的返回结果并更新界面。

A. onPreExecute()
B. doInBackground()
C. onProgressUpdate()
D. onPostExecute()

查看答案
更多问题

在 UI 线程中启动 AsyncTask 类对象异步任务时,应该先创建自定义的AyncTask类对象,然后调用它的__________方法。

A. start()
B. execute()
C. run()
D. cancel()

Service 运行有两种模式,其中,调用应用组件(如Acitivity)的 ________________方法启动Service实例的模式通常称为启动模式,这种模式在后台运行时,不会向Activity等组件提供操作功能调用。

A. startService()
B. bindService()
C. onStartCommand()
D. onBind()

____________类会为所有收到的Intent创建一个工作队列,让接收到的Intent排队等候后台线程方法 onHandleIntent()方法处理

A. Service
B. Thread
C. IntentService
D. Runnable

从Service生命周期角度来看,________________方法只有在Service类加载到运行内存时才会调用。

A. onCreate()
B. onStartCommand()
C. onBind()
D. onDestroy()

答案查题题库