谁能解释一下android上的以下代码是什么意思?
问题描述:
public class FilesListAdapter extends BaseExpandableListAdapter {
public FilesListAdapter(Context context, SharedPreferences preferences) {
this.context = context;
this.preferences = preferences;
resources = context.getResources();
layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
reset(false);
}
答
这是一个扩展AsyncTask的类
允许它更新构造函数中传入的ProgressDialog
。
它支持通过点击返回取消正在运行的任务等操作键,同时显示ProgressDialog
。
该课程旨在扩展和实际该任务的工作将在受保护的抽象结果doInBackground(Params ... params)
方法中完成。
可以在此处找到AsyncTask
的 API 文档; AyncTask [ ^ ]
希望这会有所帮助,
Fredrik
It''s a class that extendsAsyncTask
to allow it to update theProgressDialog
passed in in the constructor.
It supports operations such as cancelling the running task by hitting the Back key whilst theProgressDialog
is showing.
The class is intended to be extended and the actual work of the task will be done in theprotected abstract Result doInBackground (Params... params)
method.
The API documentation forAsyncTask
can be found here; AyncTask[^]
Hope this helps,
Fredrik